Vue Query Types (src/types.ts)

query · packages/vue-query/src/types.ts · typescript · MIT
ui, dev-tools, lang:typescript, fw:vue, tag:reactivity, tag:query

TypeScript type definitions and helpers for reactive Vue Query options, wrapping query-core types with Vue's Ref/ComputedRef reactivity patterns.

// 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,
  DehydrateOptions,
  HydrateOptions,
  MutationCache,
  MutationObserverOptions,
  OmitKeyof,
  QueryCache,
  QueryObserverOptions,
} from '@tanstack/query-core'
import type { ComputedRef, Ref, UnwrapRef } from 'vue-demi'

type Primitive = string | number | boolean | bigint | symbol | undefined | null
type UnwrapLeaf =
  | Primitive
  | Function
  | Date
  | Error
  | RegExp
  | Map<any, any>
  | WeakMap<any, any>
  | Set<any>
  | WeakSet<any>

/** A plain value or a reactive getter (`() => T`) that returns one. */
export type MaybeGetter<T> = T | (() => T)

/**
 * A plain value, a `Ref`, or a `Co

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

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

Get a free API key