useReducer type definitions not working typescript I am trying to implement a useReducer hook in typescript like so: