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'm receiving a type error when using two async actions on one reducer:
Argument of type '(response: AxiosResponse<LoginResponse>) => PayloadAction<"USER/AUTH/RENEW_SUCCESS", AxiosResponse<LoginResponse>>' is not assignable to parameter of type '((...args: any[]) => PayloadAction<"USER/PERMISSION/SET_LOCATION", PermissionInfo> | PayloadAction<"USER/PERMISSION/SET_LOADING", boolean> | ... 11 more ... | EmptyAction<...>) | ((...args: any[]) => PayloadAction<...> | ... 12 more ... | EmptyAction<...>)[]'.
Type '(response: AxiosResponse<LoginResponse>) => PayloadAction<"USER/AUTH/RENEW_SUCCESS", AxiosResponse<LoginResponse>>' is not assignable to type '(...args: any[]) => PayloadAction<"USER/PERMISSION/SET_LOCATION", PermissionInfo> | PayloadAction<"USER/PERMISSION/SET_LOADING", boolean> | ... 11 more ... | EmptyAction<...>'.
Type 'PayloadAction<"USER/AUTH/RENEW_SUCCESS", AxiosResponse<LoginResponse>>' is not assignable to type 'PayloadAction<"USER/PERMISSION/SET_LOCATION", PermissionInfo> | PayloadAction<"USER/PERMISSION/SET_LOADING", boolean> | ... 11 more ... | EmptyAction<...>'.
Type 'PayloadAction<"USER/AUTH/RENEW_SUCCESS", AxiosResponse<LoginResponse>>' is not assignable to type 'PayloadAction<"USER/PERMISSION/SET_LOCATION", PermissionInfo>'.
Type '"USER/AUTH/RENEW_SUCCESS"' is not assignable to type '"USER/PERMISSION/SET_LOCATION"'.
Mandatory info
Are you extending internal types to enable type-free syntax with createReducer?
No type error there, since everything was ok until I added the renew handlers on this reducer.
I've tried a lot of stuff, changing types, removing that other action but the error just changes the message and never goes away.
Suggested solution(s)
I really don't know. But if I can help in any way, just say. I'm sorry I couldn't put a codesandbox link. I'm using ReactNative and I found it very hard to recreate the same environment on codesandbox.
Description
I'm receiving a type error when using two async actions on one reducer:
Mandatory info
createReducer
?How to Reproduce
This is my folder structure:
My async actions (./app/user/store/auth):
The action the error cites as conflict (./app/user/store/permissions/actions.ts):
Expected behavior
No type error there, since everything was ok until I added the renew handlers on this reducer.
I've tried a lot of stuff, changing types, removing that other action but the error just changes the message and never goes away.
Suggested solution(s)
I really don't know. But if I can help in any way, just say. I'm sorry I couldn't put a codesandbox link. I'm using ReactNative and I found it very hard to recreate the same environment on codesandbox.
Project Dependencies
Environment (optional)
The text was updated successfully, but these errors were encountered: