Skip to content

Property 'then' does not exist on type 'AsyncThunkAction' #678

@ezhikov

Description

@ezhikov

Hi. I'm following instruction on how to get thunk result in place where dispatch was called, but typescript don't see AsyncThunkAction as thenable. I tried both approaches, from createAsyncThunk doc page and from usage with Typescript. In second case I'm getting Argument of type 'AsyncThunkAction<boolean, number, {}>' is not assignable to parameter of type 'Action<unknown>'. Property 'type' is missing in type 'AsyncThunkAction<boolean, number, {}>' but required in type 'Action<unknown>'.ts(2345)

Here is sandbox with both approaches.

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