-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The inferred type of [...] cannot be named without a reference to [...] buildHooks.js #3983
Comments
I refactored my code today and got around this problem. The two things I did was:
I'm going to close this issue now. Keep up the good work! |
This is still valid ECMAScript, so there is a typescript problem here. Managing exports is important for large projects. I'm not sure exactly where the responsibility falls but I've opened an issue here with more detail and it's in the bugfix queue. #4066 |
- This should serve as a partial fix for reduxjs#3962, reduxjs#4448, reduxjs#3983, reduxjs#4066, reduxjs#4108, reduxjs#4401 - Here is the list of the problematic (now exported) types: From `@reduxjs/toolkit`: - `CombinedSliceReducer` - `CaseReducerDefinition` - `Id` renamed to `TSHelpersId` - `UncheckedIndexedAccess` - `ReducerWithInitialState` - `CaseReducerDefinition` - `Id` renamed to `TSHelpersId` - `UncheckedIndexedAccess` - `ReducerWithInitialState` From `@reduxjs/toolkit/query/react`: - `UseLazyQuery` - `UseQuery` - `QueryHooks`
i have same problem/ i use official example by redux https://github.com/reduxjs/redux-templates/blob/master/packages/vite-template-redux/src/features/quotes/quotesApiSlice.ts and have error |
@Romanmed2000 if you install the build from here, does that fix the issue?
We have a PR #4467 open from @aryaemami59 aiming to fix it, but as the size of the PR may tell you, it's not an easy fix. It's taken him months of work so far. |
Porting from RTK Toolkit 1.9.7 to 2.0.1 I get the following problem for my RTK Query endpoints when exporting the generated hooks.
E.g.,
This error occurs on all endpoints, not just this one. I do not import or use buildHooks anywhere in my code.
The text was updated successfully, but these errors were encountered: