Skip to content
Source
Sign inSign up
TanStack/query

fix(vue-query,query-core): export queryOptions supporting types and add declaration-emit tests #12723

Open2tsoftwareapp(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/12723/headopened View on GitHub

Showing 6 changed files with 107 additions and 0 deletions (loading 3).

x
0 of 6 viewed, 6 left
6 additions and 0 deletions.changeset/vue-query-export-query-options-supporting-types.mdAdded
View file
@@ -0,0 +1,6 @@
+---
+'@tanstack/query-core': patch
+'@tanstack/vue-query': patch
+---
+​
+Export supporting types referenced by `queryOptions` signatures (`QueryBehavior`, `RetryValue`, `RetryDelayValue`, `FetchContext`, `FetchDirection`, `FetchMeta`, `FetchOptions`, `ShallowOption`, `MaybeRefOrGetter`, `MaybeRef`, `MaybeRefDeep`, `MaybeGetter`, `DeepUnwrapRef`)
67 additions and 0 deletionsintegrations/vue/declaration-emit/consumer/query-options.tsModified
View file
@@ -1,9 +1,76 @@
+import { QueryClient, queryOptions, useQuery } from '@tanstack/vue-query'
import {
definedInitialDataOptions,
+ getThingGetterQueryOptions,
+ getThingQueryOptions,
undefinedInitialDataOptions,
} from '../dist/query-options.js'
+import type {
+ DefinedInitialQueryOptionsWithDataTag,
+ MaybeRefOrGetter,
+ QueryBehavior,
+ RetryDelayValue,
+ RetryValue,
+ ShallowOption,
+ UndefinedInitialQueryOptionsWithDataTag,
+} from '@tanstack/vue-query'
+​
+type Equal<A, B> =
+ (<T>() => T extends A ? 1 : 2) extends <T>() => T extends B ? 1 : 2
+ ? true
+ : false