Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

README.md

14 lines846 Bytes

1# TanStack React Query NodeNext Integration
2​
3Checks that `@tanstack/react-query` resolves and emits declarations under `moduleResolution: "nodenext"` from both ESM and CommonJS files.
4​
5## What it checks
6​
7- `src/hooks.ts` (ESM, since `package.json` sets `"type": "module"`) and `src/hooks.cts` (CommonJS) both export a hook that calls `useQuery`.
8- `tsconfig.json` sets `module` and `moduleResolution` to `nodenext` with `declaration` and `emitDeclarationOnly`, so the declarations for both files are emitted to `dist/`.
9- The check runs with TypeScript 6, TypeScript 7.0, and TypeScript 7.1 (dev build) from the root `node_modules`.
10- CI runs the `test:types` script, which runs `test:types:ts6`, `test:types:ts7`, and `test:types:ts71`.
11​
12To run it from the repository root:
13​
14- `pnpm nx run @tanstack/query-integration-react-nodenext:test:types`