-
-
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
Typescript errors when passing null as payload to actions returned from createSlice #165
Comments
tagging @phryneas @Dudeonyx @denisw @Jessidhia |
Okay, this seems to come from the fact that you are using TS 3.3 - in TS 3.5, the action type infers to a I'll try and see if we can have it default to |
see #166 - could you please test this? |
Ok I updated my TS versio from 3.4 to 3.5.3 and it solves the problem yes. |
Hopefully resolved by #166 . Merged, and will probably get that change out in 0.8 . |
When using actions created from
createSlice
, Typescript complains with:Argument of type 'null' is not assignable to parameter of type '{}'
.But if you just use actions from
createAction
, it compiles.Sandbox example
The text was updated successfully, but these errors were encountered: