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
I tried to create a lib which contains simple Slice. If I include the file in the app project directly, it works.
But, if I build a lib which includes the file and add dependency of it, the app reports error
Type 'typeof import("/Users/user/temp/redux-toolkit-app/node_modules/my-redux-lib/dist/types")' is not assignable to type 'Reducer<unknown, AnyAction>'.
Type 'typeof import("/Users/user/temp/redux-toolkit-app/node_modules/my-redux-lib/dist/types")' provides no match for the signature '(state: unknown, action: AnyAction): unknown'.ts(2322)
Can you post an actual repo that shows this happening? I know I've seen people use createSlice in a library before. My first guess would be possibly something to do with the build configuration for your library.
Unfortunately this isn't something we have time to look into right now. If you have an example that shows it's a bug with RTK itself we can maybe look at it again, but otherwise I would assume this is a problem with your build setup.
I tried to create a lib which contains simple Slice. If I include the file in the app project directly, it works.
But, if I build a lib which includes the file and add dependency of it, the app reports error
Main codes,
The text was updated successfully, but these errors were encountered: