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
Type bug: RTK Query - type for extraOptions
only works as an object with optional properties
#1087
Comments
I think we can postpone that one for a 1.7, right? |
Yep definitely |
This still happening? |
Yeah, still happening on 1.7.0-beta.0 I haven't looked into it so I don't know how much trouble the fix would be, but I would say that it's a rare enough problem that it could be pushed back for a later version |
I ran into this today. If this isn't going to be fixed anytime soon, it would be nice if the docs were updated to indicate only optional properties were allowed. |
@dastardlychimp PRs are always welcome. |
This has been pushed through the 1.7 and 1.8 milestones. Coming up on 1.9, and this still is just not a high enough priority. Dropping out of the 1.9 milestone. |
Description
When defining a
baseQuery
and providing a type forextraOptions
, trying to use thebaseQuery
withcreateApi
has a typescript error unless theextraOptions
type is an object with only optional properties.e.g. will not work:
will work:
Version
1.6.0-beta.0
Reproduction example
https://codesandbox.io/s/basequery-extraoptions-type-bug-w4kxt?file=/src/index.ts
The text was updated successfully, but these errors were encountered: