-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS error on injected API optimistic update #4471
Comments
I see that you have set up a |
Hi, the inferred type is:
The store config is:
And the
Hope that helps :) |
Sorry, to clarify, what is the type of the |
Ah, it seems it doesn't have the injected endpoints |
Yeah, the API slice TS types only know about the endpoints in the original definition. That said, the original error sounds more like "this typed version of |
Hi, I'm getting a TS error when I try to use optimistic updates on a code-split API instance. The thunk works correctly and updates the data correctly, but TypeScript isn't happy. Here's the thunk:
TS error:
I'm not sure what I'm doing wrong, as this endpoint is definitely defined within this set of endpoints.
The text was updated successfully, but these errors were encountered: