Argument of type 'any' is not assignable to parameter of type 'never' code example
Example 1: string is not assignable to type never
const result : string[] = [];
Example 2: Argument of type 'InitialState' is not assignable to parameter of type 'never'
I also struggled with this problem. The best way to prevent bugs seems to me to add the State Interface as the return type of the reducer. Then you see the type errors inside the reducer instead on the useReducer line.
like this:
function reducer(state: IState, action: IFluxAction): IState {
// reducer code
// type errors are visible here
}