diff --git a/packages/angular-query-experimental/etc/angular-query-experimental.api.md b/packages/angular-query-experimental/etc/angular-query-experimental.api.md index f49ec693ca..c9cb159b4a 100644 --- a/packages/angular-query-experimental/etc/angular-query-experimental.api.md +++ b/packages/angular-query-experimental/etc/angular-query-experimental.api.md @@ -3,683 +3,250 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import type { DataTag } from '@tanstack/query-core' -import { DefaultError } from '@tanstack/query-core' -import type { DefinedInfiniteQueryObserverResult } from '@tanstack/query-core' -import type { DefinedQueryObserverResult } from '@tanstack/query-core' -import type { EnvironmentProviders } from '@angular/core' -import type { InfiniteData } from '@tanstack/query-core' -import type { InfiniteQueryObserverOptions } from '@tanstack/query-core' -import type { InfiniteQueryObserverResult } from '@tanstack/query-core' -import { InjectOptions } from '@angular/core' -import { Injector } from '@angular/core' -import type { MutateFunction } from '@tanstack/query-core' -import { Mutation } from '@tanstack/query-core' -import { MutationFilters } from '@tanstack/query-core' -import type { MutationObserverOptions } from '@tanstack/query-core' -import type { MutationObserverResult } from '@tanstack/query-core' -import { MutationState } from '@tanstack/query-core' -import type { OmitKeyof } from '@tanstack/query-core' -import { Provider } from '@angular/core' -import type { QueriesPlaceholderDataFunction } from '@tanstack/query-core' -import type { QueryClient } from '@tanstack/query-core' -import { QueryFilters } from '@tanstack/query-core' -import type { QueryFunction } from '@tanstack/query-core' -import type { QueryKey } from '@tanstack/query-core' -import type { QueryObserverOptions } from '@tanstack/query-core' -import type { QueryObserverResult } from '@tanstack/query-core' -import type { Signal } from '@angular/core' -import type { SkipToken } from '@tanstack/query-core' -import type { ThrowOnError } from '@tanstack/query-core' -// @public (undocumented) -export interface BaseMutationNarrowing< - TData = unknown, - TError = DefaultError, - TVariables = unknown, - TContext = unknown, -> { - // (undocumented) - isError: ( - this: CreateMutationResult, - ) => this is CreateMutationResult< - TData, - TError, - TVariables, - TContext, - CreateStatusBasedMutationResult< - 'error', - TData, - TError, - TVariables, - TContext - > - > - // (undocumented) - isIdle: ( - this: CreateMutationResult, - ) => this is CreateMutationResult< - TData, - TError, - TVariables, - TContext, - CreateStatusBasedMutationResult<'idle', TData, TError, TVariables, TContext> - > - // (undocumented) - isPending: ( - this: CreateMutationResult, - ) => this is CreateMutationResult< - TData, - TError, - TVariables, - TContext, - CreateStatusBasedMutationResult< - 'pending', - TData, - TError, - TVariables, - TContext - > - > - // Warning: (ae-forgotten-export) The symbol "CreateStatusBasedMutationResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - isSuccess: ( - this: CreateMutationResult, - ) => this is CreateMutationResult< - TData, - TError, - TVariables, - TContext, - CreateStatusBasedMutationResult< - 'success', - TData, - TError, - TVariables, - TContext - > - > +import type { DataTag } from '@tanstack/query-core'; +import { DefaultError } from '@tanstack/query-core'; +import type { DefinedInfiniteQueryObserverResult } from '@tanstack/query-core'; +import type { DefinedQueryObserverResult } from '@tanstack/query-core'; +import type { EnvironmentProviders } from '@angular/core'; +import type { InfiniteData } from '@tanstack/query-core'; +import type { InfiniteQueryObserverOptions } from '@tanstack/query-core'; +import type { InfiniteQueryObserverResult } from '@tanstack/query-core'; +import { InjectOptions } from '@angular/core'; +import { Injector } from '@angular/core'; +import type { MutateFunction } from '@tanstack/query-core'; +import { Mutation } from '@tanstack/query-core'; +import { MutationFilters } from '@tanstack/query-core'; +import type { MutationObserverOptions } from '@tanstack/query-core'; +import type { MutationObserverResult } from '@tanstack/query-core'; +import { MutationState } from '@tanstack/query-core'; +import type { OmitKeyof } from '@tanstack/query-core'; +import { Provider } from '@angular/core'; +import type { QueriesPlaceholderDataFunction } from '@tanstack/query-core'; +import type { QueryClient } from '@tanstack/query-core'; +import { QueryFilters } from '@tanstack/query-core'; +import type { QueryFunction } from '@tanstack/query-core'; +import type { QueryKey } from '@tanstack/query-core'; +import type { QueryObserverOptions } from '@tanstack/query-core'; +import type { QueryObserverResult } from '@tanstack/query-core'; +import type { Signal } from '@angular/core'; +import type { SkipToken } from '@tanstack/query-core'; +import type { ThrowOnError } from '@tanstack/query-core'; + +// @public (undocumented) +export interface BaseMutationNarrowing { + // (undocumented) + isError: (this: CreateMutationResult) => this is CreateMutationResult>; + // (undocumented) + isIdle: (this: CreateMutationResult) => this is CreateMutationResult>; + // (undocumented) + isPending: (this: CreateMutationResult) => this is CreateMutationResult>; + // Warning: (ae-forgotten-export) The symbol "CreateStatusBasedMutationResult" needs to be exported by the entry point index.d.ts + // + // (undocumented) + isSuccess: (this: CreateMutationResult) => this is CreateMutationResult>; } // @public (undocumented) export interface BaseQueryNarrowing { - // (undocumented) - isError: ( - this: CreateBaseQueryResult, - ) => this is CreateBaseQueryResult< - TData, - TError, - CreateStatusBasedQueryResult<'error', TData, TError> - > - // (undocumented) - isPending: ( - this: CreateBaseQueryResult, - ) => this is CreateBaseQueryResult< - TData, - TError, - CreateStatusBasedQueryResult<'pending', TData, TError> - > - // Warning: (ae-forgotten-export) The symbol "CreateStatusBasedQueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - isSuccess: ( - this: CreateBaseQueryResult, - ) => this is CreateBaseQueryResult< - TData, - TError, - CreateStatusBasedQueryResult<'success', TData, TError> - > + // (undocumented) + isError: (this: CreateBaseQueryResult) => this is CreateBaseQueryResult>; + // (undocumented) + isPending: (this: CreateBaseQueryResult) => this is CreateBaseQueryResult>; + // Warning: (ae-forgotten-export) The symbol "CreateStatusBasedQueryResult" needs to be exported by the entry point index.d.ts + // + // (undocumented) + isSuccess: (this: CreateBaseQueryResult) => this is CreateBaseQueryResult>; } // Warning: (ae-forgotten-export) The symbol "Override" needs to be exported by the entry point index.d.ts // // @public (undocumented) -export type CreateBaseMutationResult< - TData = unknown, - TError = DefaultError, - TVariables = unknown, - TContext = unknown, -> = Override< - MutationObserverResult, - { - mutate: CreateMutateFunction - } -> & { - mutateAsync: CreateMutateAsyncFunction -} +export type CreateBaseMutationResult = Override, { + mutate: CreateMutateFunction; +}> & { + mutateAsync: CreateMutateAsyncFunction; +}; // @public (undocumented) -export interface CreateBaseQueryOptions< - TQueryFnData = unknown, - TError = DefaultError, - TData = TQueryFnData, - TQueryData = TQueryFnData, - TQueryKey extends QueryKey = QueryKey, -> extends QueryObserverOptions< - TQueryFnData, - TError, - TData, - TQueryData, - TQueryKey - > {} +export interface CreateBaseQueryOptions extends QueryObserverOptions { +} // Warning: (ae-forgotten-export) The symbol "MapToSignals" needs to be exported by the entry point index.d.ts // // @public (undocumented) -export type CreateBaseQueryResult< - TData = unknown, - TError = DefaultError, - TState = QueryObserverResult, -> = BaseQueryNarrowing & - MapToSignals> +export type CreateBaseQueryResult> = BaseQueryNarrowing & MapToSignals>; // @public (undocumented) -export interface CreateInfiniteQueryOptions< - TQueryFnData = unknown, - TError = DefaultError, - TData = TQueryFnData, - TQueryData = TQueryFnData, - TQueryKey extends QueryKey = QueryKey, - TPageParam = unknown, -> extends OmitKeyof< - InfiniteQueryObserverOptions< - TQueryFnData, - TError, - TData, - TQueryData, - TQueryKey, - TPageParam - >, - 'suspense' - > {} +export interface CreateInfiniteQueryOptions extends OmitKeyof, 'suspense'> { +} // @public (undocumented) -export type CreateInfiniteQueryResult< - TData = unknown, - TError = DefaultError, -> = MapToSignals> +export type CreateInfiniteQueryResult = MapToSignals>; // @public (undocumented) -export type CreateMutateAsyncFunction< - TData = unknown, - TError = DefaultError, - TVariables = void, - TContext = unknown, -> = MutateFunction +export type CreateMutateAsyncFunction = MutateFunction; // @public (undocumented) -export type CreateMutateFunction< - TData = unknown, - TError = DefaultError, - TVariables = void, - TContext = unknown, -> = ( - ...args: Parameters> -) => void +export type CreateMutateFunction = (...args: Parameters>) => void; // @public (undocumented) -export interface CreateMutationOptions< - TData = unknown, - TError = DefaultError, - TVariables = void, - TContext = unknown, -> extends OmitKeyof< - MutationObserverOptions, - '_defaulted' - > {} +export interface CreateMutationOptions extends OmitKeyof, '_defaulted'> { +} // @public (undocumented) -export type CreateMutationResult< - TData = unknown, - TError = DefaultError, - TVariables = unknown, - TContext = unknown, - TState = CreateStatusBasedMutationResult< - CreateBaseMutationResult['status'], - TData, - TError, - TVariables, - TContext - >, -> = BaseMutationNarrowing & - MapToSignals> +export type CreateMutationResult> = BaseMutationNarrowing & MapToSignals>; // @public (undocumented) -export interface CreateQueryOptions< - TQueryFnData = unknown, - TError = DefaultError, - TData = TQueryFnData, - TQueryKey extends QueryKey = QueryKey, -> extends OmitKeyof< - CreateBaseQueryOptions< - TQueryFnData, - TError, - TData, - TQueryFnData, - TQueryKey - >, - 'suspense' - > {} +export interface CreateQueryOptions extends OmitKeyof, 'suspense'> { +} // @public (undocumented) -export type CreateQueryResult< - TData = unknown, - TError = DefaultError, -> = CreateBaseQueryResult +export type CreateQueryResult = CreateBaseQueryResult; // @public (undocumented) -export type DefinedCreateInfiniteQueryResult< - TData = unknown, - TError = DefaultError, - TDefinedInfiniteQueryObserver = DefinedInfiniteQueryObserverResult< - TData, - TError - >, -> = MapToSignals +export type DefinedCreateInfiniteQueryResult> = MapToSignals; // @public (undocumented) -export type DefinedCreateQueryResult< - TData = unknown, - TError = DefaultError, - TDefinedQueryObserver = DefinedQueryObserverResult, -> = MapToSignals +export type DefinedCreateQueryResult> = MapToSignals; // @public (undocumented) -export type DefinedInitialDataInfiniteOptions< - TQueryFnData, - TError = DefaultError, - TData = InfiniteData, - TQueryKey extends QueryKey = QueryKey, - TPageParam = unknown, -> = CreateInfiniteQueryOptions< - TQueryFnData, - TError, - TData, - TQueryFnData, - TQueryKey, - TPageParam -> & { - initialData: - | NonUndefinedGuard> - | (() => NonUndefinedGuard>) -} +export type DefinedInitialDataInfiniteOptions, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = CreateInfiniteQueryOptions & { + initialData: NonUndefinedGuard> | (() => NonUndefinedGuard>); +}; // @public (undocumented) -export type DefinedInitialDataOptions< - TQueryFnData = unknown, - TError = DefaultError, - TData = TQueryFnData, - TQueryKey extends QueryKey = QueryKey, -> = CreateQueryOptions & { - initialData: - | NonUndefinedGuard - | (() => NonUndefinedGuard) -} +export type DefinedInitialDataOptions = CreateQueryOptions & { + initialData: NonUndefinedGuard | (() => NonUndefinedGuard); +}; // @public -export function infiniteQueryOptions< - TQueryFnData, - TError = DefaultError, - TData = InfiniteData, - TQueryKey extends QueryKey = QueryKey, - TPageParam = unknown, ->( - options: UndefinedInitialDataInfiniteOptions< - TQueryFnData, - TError, - TData, - TQueryKey, - TPageParam - >, -): UndefinedInitialDataInfiniteOptions< - TQueryFnData, - TError, - TData, - TQueryKey, - TPageParam -> & { - queryKey: DataTag> -} +export function infiniteQueryOptions, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UndefinedInitialDataInfiniteOptions): UndefinedInitialDataInfiniteOptions & { + queryKey: DataTag>; +}; // @public -export function infiniteQueryOptions< - TQueryFnData, - TError = DefaultError, - TData = InfiniteData, - TQueryKey extends QueryKey = QueryKey, - TPageParam = unknown, ->( - options: DefinedInitialDataInfiniteOptions< - TQueryFnData, - TError, - TData, - TQueryKey, - TPageParam - >, -): DefinedInitialDataInfiniteOptions< - TQueryFnData, - TError, - TData, - TQueryKey, - TPageParam -> & { - queryKey: DataTag> -} +export function infiniteQueryOptions, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions): DefinedInitialDataInfiniteOptions & { + queryKey: DataTag>; +}; // @public -export function injectInfiniteQuery< - TQueryFnData, - TError = DefaultError, - TData = InfiniteData, - TQueryKey extends QueryKey = QueryKey, - TPageParam = unknown, ->( - optionsFn: ( - client: QueryClient, - ) => UndefinedInitialDataInfiniteOptions< - TQueryFnData, - TError, - TData, - TQueryKey, - TPageParam - >, - injector?: Injector, -): CreateInfiniteQueryResult +export function injectInfiniteQuery, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(optionsFn: (client: QueryClient) => UndefinedInitialDataInfiniteOptions, injector?: Injector): CreateInfiniteQueryResult; // @public -export function injectInfiniteQuery< - TQueryFnData, - TError = DefaultError, - TData = InfiniteData, - TQueryKey extends QueryKey = QueryKey, - TPageParam = unknown, ->( - optionsFn: ( - client: QueryClient, - ) => DefinedInitialDataInfiniteOptions< - TQueryFnData, - TError, - TData, - TQueryKey, - TPageParam - >, - injector?: Injector, -): DefinedCreateInfiniteQueryResult +export function injectInfiniteQuery, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(optionsFn: (client: QueryClient) => DefinedInitialDataInfiniteOptions, injector?: Injector): DefinedCreateInfiniteQueryResult; // @public -export function injectInfiniteQuery< - TQueryFnData, - TError = DefaultError, - TData = InfiniteData, - TQueryKey extends QueryKey = QueryKey, - TPageParam = unknown, ->( - optionsFn: ( - client: QueryClient, - ) => CreateInfiniteQueryOptions< - TQueryFnData, - TError, - TData, - TQueryFnData, - TQueryKey, - TPageParam - >, - injector?: Injector, -): CreateInfiniteQueryResult +export function injectInfiniteQuery, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(optionsFn: (client: QueryClient) => CreateInfiniteQueryOptions, injector?: Injector): CreateInfiniteQueryResult; // @public -export function injectIsFetching( - filters?: QueryFilters, - injector?: Injector, -): Signal +export function injectIsFetching(filters?: QueryFilters, injector?: Injector): Signal; // @public -export function injectIsMutating( - filters?: MutationFilters, - injector?: Injector, -): Signal +export function injectIsMutating(filters?: MutationFilters, injector?: Injector): Signal; // @public -export function injectMutation< - TData = unknown, - TError = DefaultError, - TVariables = void, - TContext = unknown, ->( - optionsFn: ( - client: QueryClient, - ) => CreateMutationOptions, - injector?: Injector, -): CreateMutationResult +export function injectMutation(optionsFn: (client: QueryClient) => CreateMutationOptions, injector?: Injector): CreateMutationResult; // Warning: (ae-forgotten-export) The symbol "MutationStateOptions" needs to be exported by the entry point index.d.ts // // @public -export function injectMutationState( - mutationStateOptionsFn?: () => MutationStateOptions, - options?: InjectMutationStateOptions, -): Signal> +export function injectMutationState(mutationStateOptionsFn?: () => MutationStateOptions, options?: InjectMutationStateOptions): Signal>; // @public (undocumented) export interface InjectMutationStateOptions { - // (undocumented) - injector?: Injector + // (undocumented) + injector?: Injector; } // @public (undocumented) -export function injectQueries< - T extends Array, - TCombinedResult = QueriesResults, ->( - { - queries, - ...options - }: { - queries: Signal<[...QueriesOptions]> - combine?: (result: QueriesResults) => TCombinedResult - }, - injector?: Injector, -): Signal +export function injectQueries, TCombinedResult = QueriesResults>({ queries, ...options }: { + queries: Signal<[...QueriesOptions]>; + combine?: (result: QueriesResults) => TCombinedResult; +}, injector?: Injector): Signal; // @public -export function injectQuery< - TQueryFnData = unknown, - TError = DefaultError, - TData = TQueryFnData, - TQueryKey extends QueryKey = QueryKey, ->( - optionsFn: ( - client: QueryClient, - ) => DefinedInitialDataOptions, - injector?: Injector, -): DefinedCreateQueryResult +export function injectQuery(optionsFn: (client: QueryClient) => DefinedInitialDataOptions, injector?: Injector): DefinedCreateQueryResult; // @public -export function injectQuery< - TQueryFnData = unknown, - TError = DefaultError, - TData = TQueryFnData, - TQueryKey extends QueryKey = QueryKey, ->( - optionsFn: ( - client: QueryClient, - ) => UndefinedInitialDataOptions, - injector?: Injector, -): CreateQueryResult +export function injectQuery(optionsFn: (client: QueryClient) => UndefinedInitialDataOptions, injector?: Injector): CreateQueryResult; // @public -export function injectQuery< - TQueryFnData = unknown, - TError = DefaultError, - TData = TQueryFnData, - TQueryKey extends QueryKey = QueryKey, ->( - optionsFn: ( - client: QueryClient, - ) => CreateQueryOptions, - injector?: Injector, -): CreateQueryResult +export function injectQuery(optionsFn: (client: QueryClient) => CreateQueryOptions, injector?: Injector): CreateQueryResult; // @public export const injectQueryClient: { - (): QueryClient - ( - injectOptions: InjectOptions & { - optional?: false + (): QueryClient; + (injectOptions: InjectOptions & { + optional?: false; } & { - injector?: Injector - }, - ): QueryClient - ( - injectOptions: InjectOptions & { - injector?: Injector - }, - ): QueryClient -} + injector?: Injector; + }): QueryClient; + (injectOptions: InjectOptions & { + injector?: Injector; + }): QueryClient; +}; // @public (undocumented) -export type NonUndefinedGuard = T extends undefined ? never : T +export type NonUndefinedGuard = T extends undefined ? never : T; // @public -export function provideAngularQuery( - queryClient: QueryClient, -): EnvironmentProviders +export function provideAngularQuery(queryClient: QueryClient): EnvironmentProviders; // @public -export const provideQueryClient: (( - value: QueryClient | (() => QueryClient), -) => Provider) & - ((value: QueryClient | (() => QueryClient)) => Provider) +export const provideQueryClient: ((value: QueryClient | (() => QueryClient)) => Provider) & ((value: QueryClient | (() => QueryClient)) => Provider); // Warning: (ae-forgotten-export) The symbol "MAXIMUM_DEPTH" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "QueryObserverOptionsForCreateQueries" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "GetOptions" needs to be exported by the entry point index.d.ts // // @public -export type QueriesOptions< - T extends Array, - TResult extends Array = [], - TDepth extends ReadonlyArray = [], -> = TDepth['length'] extends MAXIMUM_DEPTH - ? Array - : T extends [] - ? [] - : T extends [infer Head] - ? [...TResult, GetOptions] - : T extends [infer Head, ...infer Tail] - ? QueriesOptions< - [...Tail], - [...TResult, GetOptions], - [...TDepth, 1] - > - : ReadonlyArray extends T - ? T - : T extends Array< - QueryObserverOptionsForCreateQueries< - infer TQueryFnData, - infer TError, - infer TData, - infer TQueryKey - > - > - ? Array< - QueryObserverOptionsForCreateQueries< - TQueryFnData, - TError, - TData, - TQueryKey - > - > - : Array +export type QueriesOptions, TResult extends Array = [], TDepth extends ReadonlyArray = []> = TDepth['length'] extends MAXIMUM_DEPTH ? Array : T extends [] ? [] : T extends [infer Head] ? [...TResult, GetOptions] : T extends [infer Head, ...infer Tail] ? QueriesOptions<[ +...Tail +], [ +...TResult, +GetOptions +], [ +...TDepth, +1 +]> : ReadonlyArray extends T ? T : T extends Array> ? Array> : Array; // Warning: (ae-forgotten-export) The symbol "GetResults" needs to be exported by the entry point index.d.ts // // @public -export type QueriesResults< - T extends Array, - TResult extends Array = [], - TDepth extends ReadonlyArray = [], -> = TDepth['length'] extends MAXIMUM_DEPTH - ? Array - : T extends [] - ? [] - : T extends [infer Head] - ? [...TResult, GetResults] - : T extends [infer Head, ...infer Tail] - ? QueriesResults< - [...Tail], - [...TResult, GetResults], - [...TDepth, 1] - > - : T extends Array< - QueryObserverOptionsForCreateQueries< - infer TQueryFnData, - infer TError, - infer TData, - any - > - > - ? Array< - QueryObserverResult< - unknown extends TData ? TQueryFnData : TData, - unknown extends TError ? DefaultError : TError - > - > - : Array +export type QueriesResults, TResult extends Array = [], TDepth extends ReadonlyArray = []> = TDepth['length'] extends MAXIMUM_DEPTH ? Array : T extends [] ? [] : T extends [infer Head] ? [...TResult, GetResults] : T extends [infer Head, ...infer Tail] ? QueriesResults<[ +...Tail +], [ +...TResult, +GetResults +], [ +...TDepth, +1 +]> : T extends Array> ? Array> : Array; // @public -export function queryOptions< - TQueryFnData = unknown, - TError = DefaultError, - TData = TQueryFnData, - TQueryKey extends QueryKey = QueryKey, ->( - options: UndefinedInitialDataOptions, -): UndefinedInitialDataOptions & { - queryKey: DataTag -} +export function queryOptions(options: UndefinedInitialDataOptions): UndefinedInitialDataOptions & { + queryKey: DataTag; +}; // @public -export function queryOptions< - TQueryFnData = unknown, - TError = DefaultError, - TData = TQueryFnData, - TQueryKey extends QueryKey = QueryKey, ->( - options: DefinedInitialDataOptions, -): DefinedInitialDataOptions & { - queryKey: DataTag -} +export function queryOptions(options: DefinedInitialDataOptions): DefinedInitialDataOptions & { + queryKey: DataTag; +}; // @public (undocumented) -export type UndefinedInitialDataInfiniteOptions< - TQueryFnData, - TError = DefaultError, - TData = InfiniteData, - TQueryKey extends QueryKey = QueryKey, - TPageParam = unknown, -> = CreateInfiniteQueryOptions< - TQueryFnData, - TError, - TData, - TQueryFnData, - TQueryKey, - TPageParam -> & { - initialData?: undefined -} +export type UndefinedInitialDataInfiniteOptions, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = CreateInfiniteQueryOptions & { + initialData?: undefined; +}; // @public (undocumented) -export type UndefinedInitialDataOptions< - TQueryFnData = unknown, - TError = DefaultError, - TData = TQueryFnData, - TQueryKey extends QueryKey = QueryKey, -> = CreateQueryOptions & { - initialData?: undefined -} +export type UndefinedInitialDataOptions = CreateQueryOptions & { + initialData?: undefined; +}; -export * from '@tanstack/query-core' + +export * from "@tanstack/query-core"; // (No @packageDocumentation comment for this package) + ``` diff --git a/packages/angular-query-experimental/src/inject-query.ts b/packages/angular-query-experimental/src/inject-query.ts index 6d67674c40..737d9947b8 100644 --- a/packages/angular-query-experimental/src/inject-query.ts +++ b/packages/angular-query-experimental/src/inject-query.ts @@ -29,7 +29,11 @@ import type { * } * ``` * - * **The options function can utilize signals** + * Similar to `computed` from Angular, the function passed to `injectQuery` will be run in the reactive context. + * In the example below, the query will be automatically enabled and executed when the filter signal changes + * to a truthy value. When the filter signal changes back to a falsy value, the query will be disabled. + * + * **Reactive example** * ```ts * class ServiceOrComponent { * filter = signal('') @@ -74,7 +78,11 @@ export function injectQuery< * } * ``` * - * **The options function can utilize signals** + * Similar to `computed` from Angular, the function passed to `injectQuery` will be run in the reactive context. + * In the example below, the query will be automatically enabled and executed when the filter signal changes + * to a truthy value. When the filter signal changes back to a falsy value, the query will be disabled. + * + * **Reactive example** * ```ts * class ServiceOrComponent { * filter = signal('') @@ -119,7 +127,11 @@ export function injectQuery< * } * ``` * - * **The options function can utilize signals** + * Similar to `computed` from Angular, the function passed to `injectQuery` will be run in the reactive context. + * In the example below, the query will be automatically enabled and executed when the filter signal changes + * to a truthy value. When the filter signal changes back to a falsy value, the query will be disabled. + * + * **Reactive example** * ```ts * class ServiceOrComponent { * filter = signal('') @@ -164,7 +176,11 @@ export function injectQuery< * } * ``` * - * **The options function can utilize signals** + * Similar to `computed` from Angular, the function passed to `injectQuery` will be run in the reactive context. + * In the example below, the query will be automatically enabled and executed when the filter signal changes + * to a truthy value. When the filter signal changes back to a falsy value, the query will be disabled. + * + * **Reactive example** * ```ts * class ServiceOrComponent { * filter = signal('')