Skip to content
Source
Sign inSign up
TanStack/query

fix(query-core): use built-in NoInfer for generic indexed-access types #10593

Mergedousamabenyounes(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/10593/headmerged by TkDodo View on GitHub

Showing 7 changed files with 7 additions and 7 deletions (loading 4).

x
0 of 7 viewed, 7 left
6 additions and 0 deletions.changeset/query-core-noinfer-builtin.mdAdded
View file
@@ -0,0 +1,6 @@
+---
+'@tanstack/query-core': patch
+'@tanstack/vue-query': patch
+---
+​
+fix(query-core): drop the custom `NoInfer<T>` re-export and rely on TypeScript's built-in `NoInfer` (TS ≥ 5.4) so `NoInfer<X[K]>` stays assignable to `X[K]` in generic contexts (fixes #9937)
1 addition and 6 deletionspackages/preact-query/src/useQuery.tsModified
View file
@@ -1,10 +1,5 @@
import { QueryObserver } from '@tanstack/query-core'
-import type {
- DefaultError,
- NoInfer,
- QueryClient,
- QueryKey,
-} from '@tanstack/query-core'
+import type { DefaultError, QueryClient, QueryKey } from '@tanstack/query-core'
​
import type {
DefinedInitialDataOptions,
0 additions and 1 deletionpackages/query-core/src/queryClient.tsModified
View file