-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
fix(types): useSuspenseQuery should type-narrow the Error field #9105
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
Changes from 2 commits
c0bda60
70e3f17
6b8cf8e
961e4e8
5cd8471
0273210
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ import type { | |
| DefaultError, | ||
| DefinedInfiniteQueryObserverResult, | ||
| DefinedQueryObserverResult, | ||
| DistributiveOmit, | ||
| InfiniteQueryObserverOptions, | ||
| InfiniteQueryObserverResult, | ||
| MutateFunction, | ||
|
|
@@ -155,7 +156,7 @@ export type UseQueryResult< | |
| export type UseSuspenseQueryResult< | ||
| TData = unknown, | ||
| TError = DefaultError, | ||
| > = OmitKeyof< | ||
| > = DistributiveOmit< | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @manudeli I think your Because it “doesn’t work” in a sense that type narrowing to I’ve added the standard |
||
| DefinedQueryObserverResult<TData, TError>, | ||
| 'isPlaceholderData' | 'promise' | ||
| > | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.