I'm getting the errors while setting up the useReducer hook in Reactjs
ERROR in [at-loader] ./src/reducer.ts:3:372
TS2554: Expected 2 arguments, but got 1.
ERROR in [at-loader] ./src/reducer.ts:16:32
TS2554: Expected 1 arguments, but got 3.
ERROR in [at-loader] ./src/reducer.ts:23:32
TS2554: Expected 1 arguments, but got 3.
The errors have to deal with calling functions with incorrect number of arguments, but strangely this whole file only has one function definition and it's not being called anywhere. The lines of code the error messages correspond to don't really make sense either. Is there something I'm missing?
Lines 3, 16, 32 refer to inferface Action {, }, and case CLEAR_USER: respectively,
which doesn't make any sense. Also this reducer function is called in the background by react, not actually anywhere in my code.
I'm getting the errors while setting up the useReducer hook in Reactjs
The errors have to deal with calling functions with incorrect number of arguments, but strangely this whole file only has one function definition and it's not being called anywhere. The lines of code the error messages correspond to don't really make sense either. Is there something I'm missing?
reducer.js:
Lines 3, 16, 32 refer to
inferface Action {
,}
, andcase CLEAR_USER:
respectively, which doesn't make any sense. Also this reducer function is called in the background by react, not actually anywhere in my code.