I'm creating a library to allow shimming my redux store with test data, but while keeping the interfaces/actions generated by immer-reducer, combined with TS project references.
I use the compiler switch "declarations" so we generate .d.ts files, however with this switch we get compiler errors on our exported reducer functions
I'm creating a library to allow shimming my redux store with test data, but while keeping the interfaces/actions generated by immer-reducer, combined with TS project references.
I use the compiler switch "declarations" so we generate .d.ts files, however with this switch we get compiler errors on our exported reducer functions
export const uploadReducer = createReducerFunction(UploadReducer, initialState);
Exported variable 'A' has or is using name 'ImmerReducerFunction' from external module ".../immer-reducer/lib/immer-reducer" but cannot be named.
From googling, it appears that because this type isn't exported from immer-reducer, TS seems to not be able to generate the .d.ts files describing it.
Current workaround is to set reducers to type "any", which isn't a big deal but sub-optimal
export const uploadReducer: any = createReducerFunction(UploadReducer, initialState);