Skip to content

createApi from query/react typescript inference failes #4903

Open
@SamuelTilly

Description

@SamuelTilly

Hi! So this is a bit of a weird issue, and I am not enough of a typescript wiz to figure it out.

I will do my best to try to explain the issue, but basically I have a monorepo with the redux store as its own package. When importing the package to "my app" and looking at the type of my exported api, made with createApi from @reduxjs/toolkit/query/react it returns as any. Trying the same thing with @reduxjs/toolkit/query works as expected.

I have set up a small repo to illustrate the problem. https://codeberg.org/SamuelTilly/redux-ts-issue/src/branch/main

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions