fulfillWithValue
creates wrong TS types for action.payload
#2886
Labels
Milestone
fulfillWithValue
creates wrong TS types for action.payload
#2886
Originally seen while working on #2884 .
If you do
return fulfillWithValue(someValue)
increateAsyncThunk
, the TS typings end up thinking that the final return type is the contents of thatFulfillWithMeta
object. This results in TS thinking thataction.payload.payload.anyNestedField
andaction.payload.meta
are valid, even though internally we dofulfilled(action.payload)
.Example:
Looks like it's been broken since at least 1.8.
The text was updated successfully, but these errors were encountered: