Skip to content

'RootState' circularly references itself #2770

Closed
@tsarapke

Description

@tsarapke

Hello there!

We are migrating our applications to use @reduxjs/toolkit and faced with issue of RootState circularly references itself, and store implicitly has type any when we are trying to specify state type of createAsyncThunk<Blob, { height: number, width: number }, { state: RootState }>.

Reproduction

Screenshot:
image

We've already read some of existing topics here, like:
#2462
#2237
#1126
#324

But don't found any solution to handle it.

In addition, it would be nice to have exposing of AsyncThunkConfig from @reduxjs/toolkit, as for now there is no way infer that type in slice/reducer custom factory (only by specifying any)
image

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