Skip to content

Extracting a CaseReducerWithPrepare causes typescript errors #1288

@jparkrr

Description

@jparkrr

Thanks for the great library!

Very possible I'm missing something here, but I can't get past this typescript error when I try to clean up the case reducers in createSlice by extracting a CaseReducerWithPrepare.

It works fine if it's just a CaseReducer.

I've reproduced the error in this example:
https://codesandbox.io/s/casereducerwithprepare-error-9ozw2?file=/src/store/todos.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions