Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Upgraded 4.1.2 to 4.3.X of TypeScript and never is returned when calling effect-reducer with same name #912

@semoal

Description

@semoal

Describe the bug

Uupgraded from typescript 4.1.2 to 4.3.2 using Rematch. These rematch packages are used:

"@rematch/core": "2.0.1"
"@rematch/select": "3.0.1"

and I faced a typescript error: Type never has no call signatures. I looked into the 3rd parties' code and found that RematchDispatch gives never type when I have a reducer and an effect in a particular model with the same name. For example:

Reproduce Link

codesandbox.io/s/interesting-sky-wnt9p?file=/src/Count.tsx

Expected behavior

To don't throw never

Possible workaround

Meanwhile the typing issue is fixed, you can name differently the effect and the reducer

Og issue: https://stackoverflow.com/questions/68253239/why-does-rematchdispatch-give-never-type-when-there-is-a-reducer-and-an-effect

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions