-
-
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
tsconfig.json composite: true cause some types errors #4518
Comments
@bylly1 Can you run this command in your CLI and try again to see if it fixes your issue? npm install https://pkg.csb.dev/reduxjs/redux-toolkit/commit/e7b851eb/@reduxjs/toolkit |
I installed the fix and indeed solve the problem on the api but still I have problem on This is my store.ts const store = configureStore({
reducer: persistedReducer,
devTools: import.meta.env.NODE_ENV !== "production",
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
serializableCheck: {
ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],
},
immutableCheck: true,
}).concat(api.middleware, rtkQueryErrorLogger),
}); And this is the type error that I have: /*
Exported variable 'store' has or is using name 'ConfigProps' from external module "...project_path/src/redux/exampleSlice" but cannot be named.
*/ |
@bylly1 that's from your own app - just export the interface it's asking for |
@bylly1 Yup, you can either export the |
Thank you for helping me. Yes, if I convert slices interfaces into type solve the store error, but I still don't like that I need to replace interface with type |
@bylly1 In that case your best bet is to just export the |
Yes, you are right. Thank you! |
@bylly1 I'm not sure yet, it's in the middle of being reviewed so it might, I can leave a comment on this issue if it gets included in the next release. |
It'll definitely be part of the next release, yeah. |
when i create a new vite react project
tsconfig.json
comes with composite: true which cause some types error onapis
and alsostore
This is my tsconfig
I receive this error:
I receive this type error:
The text was updated successfully, but these errors were encountered: