src/infiniteQueryOptions.ts

query · packages/react-query/src/infiniteQueryOptions.ts · typescript · MIT
analytics

Provides type-safe factory functions and configuration interfaces for defining infinite queries in TanStack Query.

// Source: https://github.com/TanStack/query | License: MIT | Copyright 2021-present Tanner Linsley
// Provided via justclaw.it.com; keep this notice with the code.
import type {
  DefaultError,
  InfiniteData,
  InitialDataFunction,
  NonUndefinedGuard,
  OmitKeyof,
  QueryKey,
  QueryKeyWithDataTag,
  SkipToken,
} from '@tanstack/query-core'
import type { UseInfiniteQueryOptions } from './types'

/**
 * The options accepted by the `infiniteQueryOptions` overload selected when no `initialData` is set — `data`
 * may be `undefined` while the query is `pending`.
 * @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
 * @template TError - The type of errors your `queryFn` may throw.
 * @template TData - The type `data` ends up as after `select` runs — defaults 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key