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
Not sure if this is a rematch or typescript bug. I was debugged the types in rematch and tracked it down to type ExtractRematchDispatcherFromEffect on this line
Type inference for effects fails when payload and rootState are optional. It can be observed in here:
rematch/packages/core/test/ts_typings/dispatcher-typings.test.ts
Lines 338 to 339 in bde199f
Reproduce Link
https://codesandbox.io/s/rematch-ts-4-9-error-w4sz3r
To Reproduce
Use typescript 4.9+
Expected behavior
I should correctly infer the effect type.
Additional context
Not sure if this is a rematch or typescript bug. I was debugged the types in rematch and tracked it down to type
ExtractRematchDispatcherFromEffect
on this linerematch/packages/core/src/types.ts
Line 576 in bde199f
The effect function with optional args is not matching
(...args: infer TRest)
so it infers tonever
.The text was updated successfully, but these errors were encountered: