TanStack
API Reference

DefinedQueryNarrowing

Defined in: packages/angular-query/src/types.ts:121

Signal-backed guards for a query whose initial data excludes the pending state.

Type Parameters

TData

TData = unknown

TError

TError = DefaultError

Properties

PropertyTypeDescription
isErrorSignalFunction<() => this is DefinedCreateQueryResult<TData, TError, QueryObserverRefetchErrorResult<TData, TError>>>Returns whether the result failed and narrows its data and error signals.
isPendingSignalFunction<() => this is never>Narrows the result to the pending state when that state is possible.
isSuccessSignalFunction<() => this is DefinedCreateQueryResult<TData, TError, QueryObserverSuccessResult<TData, TError>>>Returns whether the result is successful and narrows its data and error signals.