redux-injectors
redux-injectors copied to clipboard
incorrect typing for function `createManager` ?
According to the source code of createManager, we can not pass reducer and saga in the parameter options:
const isReducerInjected = reducer // <-- check
? useInjectReducer({ key, reducer })
: true;
const isSagaInjected = saga // <-- check
? useInjectSaga({ key, saga })
: true;
But in typing, these properties are required:
export function createManager(options: { name: string, key: string, saga: Saga, /* <- required */ reducer: Reducer /* <- required */ }): ...;
What is the mistake? in typing or implementation?
Hey @mrfratello , this is a mistake with the typings. They should be optional. I see you made a PR, let me check it out
Fixed in 2.1.0