Skip to content
Source
Sign inSign up
TanStack/query

fix(vue-query): fix type of queryOptions to allow plain properies or getters #10452

MergedDamianOsipiuk(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/10452/headmerged by DamianOsipiuk(GitHub profile, opens in a new tab) View on GitHub

Showing 9 changed files with 39 additions and 8 deletions (loading 6).

x
0 of 9 viewed, 9 left
5 additions and 0 deletions.changeset/three-pillows-enter.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/vue-query': patch
+---
+​
+fix(vue-query): fix type of queryOptions to allow plain properies or getters
30 additions and 5 deletionspackages/vue-query/src/__tests__/queryOptions.test-d.tsModified
View file
@@ -11,9 +11,9 @@
const key = queryKey()
assertType(
queryOptions({
+ // @ts-expect-error this is a good error, because stallTime does not exist!
queryKey: key,
queryFn: () => Promise.resolve(5),
- // @ts-expect-error this is a good error, because stallTime does not exist!
stallTime: 1000,
}),
@@ -119,11 +119,13 @@
​
expectTypeOf(data).toEqualTypeOf<number | undefined>()