TS errors on 2.2.0
Author: ritwikvdCreated Nov 18, 2021Updated Nov 22, 2022
Labelsbugtypingstriage: accepted
Describe the bug
Reducers for which no payload argument was declared (don't require anything to be passed in) are breaking with the error Expected 2 arguments, but got 0 with the reducer typed as (payload: any, meta: any) => any.
Expected behavior
Reducers should be typed to accept invocations with no argument passed.
Desktop
- OS: Windows 11
- Browser: Chrome
- Version: 2.2.0
Additional context
This was working fine in the previous version.
Source: rematch/rematch