Skip to content

dengribar/rtkq-ts-issue-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTK Query types issue

Steps to reproduce

  1. Run npm i --force (use --force due to peer dependency issue with TypeScript v5.x.x and [email protected]) (issue)
  2. Make sure in tsconfig "strict": false and "incremental": true
  3. Run npx tsc. Make sure there are no errors, and that tsconfig.tsbuildinfo file is created in the root of the app
  4. Run npm run start. Make sure the app runs without errors, and then stop the app
  5. Rename Pokemon type to Pokemon2 in pokemon-queries.ts file
  6. Run npx tsc. There should be an error:
image
  1. Rename Pokemon2 type back to Pokemon
  2. Run npx tsc. There should be no errors
  3. Run npm run start
  4. Rename Pokemon type to Pokemon2 in pokemon-queries.ts file. There should be an error:
image
  1. Rename Pokemon2 type back to Pokemon
  2. Change incremental to false in tsconfig
  3. Run npm run start
  4. Rename Pokemon type to Pokemon2 in pokemon-queries.ts file. There should be the same error as in Step 10
  5. Rename Pokemon2 type back to Pokemon
  6. In tsconfig, change strict to true and incremental to true. Perform Steps 5 through 14, but make sure that there are no errors this time

About

Demonstrate issue with RTKQuery and TypeScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published