-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
FakeBaseQuery references an inaccessible 'unique symbol' type. #2314
Comments
@sebastienlabine |
@ytftianwen yes, I actually just created my own fake base query and used it as my baseQuery import { BaseQueryFn } from "@reduxjs/toolkit/dist/query/react"
export function fakeBaseQuery<ErrorType>(): BaseQueryFn<
void,
never,
ErrorType,
{}
> {
return function () {
throw new Error(
'When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.'
)
}
} |
Not clear if this is still an issue, so closing. |
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am building a library that exports redux-toolkit generated hooks in order to reuse theses hooks in multiple applications.
I encountered a problem while using fakeBaseQuery as baseQuery making all my hooks unsuable with typescripts:
As we can see in the fakeBaseQuery type definition, we are using a pure Symbol for the never type.
is there a reason to do so? I bypassed the error by creating my "own" fakeBaseQuery using the never type.
Thanks
The text was updated successfully, but these errors were encountered: