You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build fails due to type definitions when using 1.7 however succeeds when downgrading to 1.6.2. Included minimal project to reproduce type errors.
Expected Behavior
Build succeeds with no errors
Current Behavior
Build fails with error: node_modules/@reduxjs/toolkit/dist/query/core/module.d.ts:100:183 - error TS2344: Type 'Definitions[EndpointName]' does not satisfy the constraint 'QueryDefinition<any, any, any, any, string>'
While running a build through Vite for a project I'm working on I was able to observe this warning. Maybe it can be of help.
vite v2.7.2 building for production...
transforming...
Conflicting namespaces: "node_modules/@reduxjs/toolkit/dist/query/react/rtk-query-react.esm.js" re-exports "createApi" from both "node_modules/@reduxjs/toolkit/dist/query/react/rtk-query-react.esm.js" and "node_modules/@reduxjs/toolkit/dist/query/rtk-query.esm.js" (will be ignored)
Build fails due to type definitions when using 1.7 however succeeds when downgrading to 1.6.2. Included minimal project to reproduce type errors.
Expected Behavior
Build succeeds with no errors
Current Behavior
Build fails with error:
node_modules/@reduxjs/toolkit/dist/query/core/module.d.ts:100:183 - error TS2344: Type 'Definitions[EndpointName]' does not satisfy the constraint 'QueryDefinition<any, any, any, any, string>'
Temporary Workaround
Downgrade to 1.6.2
Steps to Reproduce
Clone example project provided: https://github.com/griffinodow/rtk-query-1.7-build-bug
npm install
dependenciesnpm run test
or run index.ts through tscThe text was updated successfully, but these errors were encountered: