repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/inject-query.ts | packages/angular-query-experimental/src/inject-query.ts | import { QueryObserver } from '@tanstack/query-core'
import {
Injector,
assertInInjectionContext,
inject,
runInInjectionContext,
} from '@angular/core'
import { createBaseQuery } from './create-base-query'
import type { DefaultError, QueryKey } from '@tanstack/query-core'
import type {
CreateQueryOptions,
C... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/query-options.ts | packages/angular-query-experimental/src/query-options.ts | import type {
DataTag,
DefaultError,
InitialDataFunction,
NonUndefinedGuard,
OmitKeyof,
QueryFunction,
QueryKey,
SkipToken,
} from '@tanstack/query-core'
import type { CreateQueryOptions } from './types'
export type UndefinedInitialDataOptions<
TQueryFnData = unknown,
TError = DefaultError,
TData... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/inject-is-fetching.ts | packages/angular-query-experimental/src/inject-is-fetching.ts | import {
DestroyRef,
Injector,
NgZone,
assertInInjectionContext,
inject,
signal,
} from '@angular/core'
import { QueryClient, notifyManager } from '@tanstack/query-core'
import type { QueryFilters } from '@tanstack/query-core'
import type { Signal } from '@angular/core'
export interface InjectIsFetchingOpt... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/inject-infinite-query.ts | packages/angular-query-experimental/src/inject-infinite-query.ts | import { InfiniteQueryObserver } from '@tanstack/query-core'
import {
Injector,
assertInInjectionContext,
inject,
runInInjectionContext,
} from '@angular/core'
import { createBaseQuery } from './create-base-query'
import type {
DefaultError,
InfiniteData,
QueryKey,
QueryObserver,
} from '@tanstack/query... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/inject-is-mutating.ts | packages/angular-query-experimental/src/inject-is-mutating.ts | import {
DestroyRef,
Injector,
NgZone,
assertInInjectionContext,
inject,
signal,
} from '@angular/core'
import { QueryClient, notifyManager } from '@tanstack/query-core'
import type { MutationFilters } from '@tanstack/query-core'
import type { Signal } from '@angular/core'
export interface InjectIsMutating... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/signal-proxy.ts | packages/angular-query-experimental/src/signal-proxy.ts | import { computed, untracked } from '@angular/core'
import type { Signal } from '@angular/core'
export type MapToSignals<T> = {
[K in keyof T]: T[K] extends Function ? T[K] : Signal<T[K]>
}
/**
* Exposes fields of an object passed via an Angular `Signal` as `Computed` signals.
* Functions on the object are passed... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/pending-tasks-compat.ts | packages/angular-query-experimental/src/pending-tasks-compat.ts | import { InjectionToken, inject } from '@angular/core'
import * as ng from '@angular/core'
import { noop } from '@tanstack/query-core'
type PendingTasksCompat = { add: () => PendingTaskRef }
export type PendingTaskRef = () => void
export const PENDING_TASKS = new InjectionToken<PendingTasksCompat>(
'PENDING_TASKS'... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/inject-query-client.ts | packages/angular-query-experimental/src/inject-query-client.ts | import { Injector, inject } from '@angular/core'
import { QueryClient } from '@tanstack/query-core'
import type { InjectOptions } from '@angular/core'
/**
* Injects a `QueryClient` instance and allows passing a custom injector.
* @param injectOptions - Type of the options argument to inject and optionally a custom i... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/create-base-query.ts | packages/angular-query-experimental/src/create-base-query.ts | import {
NgZone,
VERSION,
computed,
effect,
inject,
signal,
untracked,
} from '@angular/core'
import {
QueryClient,
notifyManager,
shouldThrowError,
} from '@tanstack/query-core'
import { signalProxy } from './signal-proxy'
import { injectIsRestoring } from './inject-is-restoring'
import { PENDING_T... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/inject-is-restoring.ts | packages/angular-query-experimental/src/inject-is-restoring.ts | import {
InjectionToken,
Injector,
assertInInjectionContext,
inject,
signal,
} from '@angular/core'
import type { Provider, Signal } from '@angular/core'
/**
* Internal token used to track isRestoring state, accessible in public API through `injectIsRestoring` and set via `provideIsRestoring`
*/
const IS_R... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/types.ts | packages/angular-query-experimental/src/types.ts | /* istanbul ignore file */
import type {
DefaultError,
DefinedInfiniteQueryObserverResult,
DefinedQueryObserverResult,
InfiniteQueryObserverOptions,
InfiniteQueryObserverResult,
MutateFunction,
MutationObserverOptions,
MutationObserverResult,
OmitKeyof,
Override,
QueryKey,
QueryObserverOptions,... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/mutation-options.ts | packages/angular-query-experimental/src/mutation-options.ts | import type { DefaultError, WithRequired } from '@tanstack/query-core'
import type { CreateMutationOptions } from './types'
/**
* Allows to share and re-use mutation options in a type-safe way.
*
* **Example**
*
* ```ts
* export class QueriesService {
* private http = inject(HttpClient)
* private queryClie... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/index.ts | packages/angular-query-experimental/src/index.ts | /* istanbul ignore file */
// Re-export core
export * from '@tanstack/query-core'
export * from './types'
export type {
DefinedInitialDataOptions,
UndefinedInitialDataOptions,
UnusedSkipTokenOptions,
} from './query-options'
export { queryOptions } from './query-options'
export type { CreateMutationOptions } ... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/inject-mutation-state.ts | packages/angular-query-experimental/src/inject-mutation-state.ts | import {
DestroyRef,
Injector,
NgZone,
assertInInjectionContext,
computed,
inject,
signal,
} from '@angular/core'
import {
QueryClient,
notifyManager,
replaceEqualDeep,
} from '@tanstack/query-core'
import type { Signal } from '@angular/core'
import type {
Mutation,
MutationCache,
MutationFilt... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/inject-mutation.ts | packages/angular-query-experimental/src/inject-mutation.ts | import {
Injector,
NgZone,
assertInInjectionContext,
computed,
effect,
inject,
signal,
untracked,
} from '@angular/core'
import {
MutationObserver,
QueryClient,
noop,
notifyManager,
shouldThrowError,
} from '@tanstack/query-core'
import { signalProxy } from './signal-proxy'
import { PENDING_TA... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/infinite-query-options.ts | packages/angular-query-experimental/src/infinite-query-options.ts | import type {
DataTag,
DefaultError,
InfiniteData,
InitialDataFunction,
NonUndefinedGuard,
OmitKeyof,
QueryKey,
SkipToken,
} from '@tanstack/query-core'
import type { CreateInfiniteQueryOptions } from './types'
export type UndefinedInitialDataInfiniteOptions<
TQueryFnData,
TError = DefaultError,
... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/inject-queries.ts | packages/angular-query-experimental/src/inject-queries.ts | import {
QueriesObserver,
QueryClient,
notifyManager,
} from '@tanstack/query-core'
import {
DestroyRef,
Injector,
NgZone,
assertInInjectionContext,
computed,
effect,
inject,
runInInjectionContext,
signal,
untracked,
} from '@angular/core'
import { signalProxy } from './signal-proxy'
import { ... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/devtools/with-devtools.ts | packages/angular-query-experimental/src/devtools/with-devtools.ts | import { isPlatformBrowser } from '@angular/common'
import {
DestroyRef,
ENVIRONMENT_INITIALIZER,
InjectionToken,
Injector,
PLATFORM_ID,
computed,
effect,
inject,
isDevMode,
} from '@angular/core'
import { QueryClient, noop, onlineManager } from '@tanstack/query-core'
import { queryFeature } from '../... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/devtools/types.ts | packages/angular-query-experimental/src/devtools/types.ts | import type { QueryClient } from '@tanstack/query-core'
import type {
DevtoolsButtonPosition,
DevtoolsErrorType,
DevtoolsPosition,
} from '@tanstack/query-devtools'
import type { DevtoolsFeature } from '../providers'
/**
* Options for configuring withDevtools.
*/
export interface WithDevtoolsOptions {
/**
... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/devtools/index.ts | packages/angular-query-experimental/src/devtools/index.ts | export type {
DevtoolsOptions,
WithDevtools,
WithDevtoolsFn,
WithDevtoolsOptions,
} from './types'
export { withDevtools } from './with-devtools'
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/devtools/stub.ts | packages/angular-query-experimental/src/devtools/stub.ts | import type { WithDevtools } from './types'
// Stub which replaces `withDevtools` in production builds
export const withDevtools: WithDevtools = () => ({
ɵkind: 'Devtools',
ɵproviders: [],
})
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/devtools/production/index.ts | packages/angular-query-experimental/src/devtools/production/index.ts | export * from '..'
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/devtools-panel/inject-devtools-panel.ts | packages/angular-query-experimental/src/devtools-panel/inject-devtools-panel.ts | import {
DestroyRef,
Injector,
PLATFORM_ID,
assertInInjectionContext,
computed,
effect,
inject,
runInInjectionContext,
untracked,
} from '@angular/core'
import { QueryClient, onlineManager } from '@tanstack/query-core'
import { isPlatformBrowser } from '@angular/common'
import type { TanstackQueryDevt... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/devtools-panel/types.ts | packages/angular-query-experimental/src/devtools-panel/types.ts | import type { DevtoolsErrorType } from '@tanstack/query-devtools'
import type { ElementRef, Injector } from '@angular/core'
import type { QueryClient } from '@tanstack/query-core'
export interface InjectDevtoolsPanelOptions {
/**
* The `Injector` in which to create the devtools panel.
*
* If this is not pro... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/devtools-panel/index.ts | packages/angular-query-experimental/src/devtools-panel/index.ts | export type {
InjectDevtoolsPanel,
DevtoolsPanelOptions,
InjectDevtoolsPanelOptions,
DevtoolsPanelRef,
} from './types'
export { injectDevtoolsPanel } from './inject-devtools-panel'
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/devtools-panel/stub.ts | packages/angular-query-experimental/src/devtools-panel/stub.ts | import { noop } from '@tanstack/query-core'
import type { InjectDevtoolsPanel } from './types'
// Stub which replaces `injectDevtoolsPanel` in production builds
export const injectDevtoolsPanel: InjectDevtoolsPanel = () => ({
destroy: noop,
})
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/devtools-panel/production/index.ts | packages/angular-query-experimental/src/devtools-panel/production/index.ts | export * from '..'
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-devtools-panel.test.ts | packages/angular-query-experimental/src/__tests__/inject-devtools-panel.test.ts | import {
ElementRef,
provideZonelessChangeDetection,
signal,
} from '@angular/core'
import { TestBed } from '@angular/core/testing'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { QueryClient } from '@tanstack/query-core'
import { provideTanStackQuery } from '../providers'
import... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/with-devtools.test.ts | packages/angular-query-experimental/src/__tests__/with-devtools.test.ts | import { afterEach, beforeEach, describe, expect, it, test, vi } from 'vitest'
import { QueryClient } from '@tanstack/query-core'
import { TestBed } from '@angular/core/testing'
import {
ENVIRONMENT_INITIALIZER,
EnvironmentInjector,
InjectionToken,
PLATFORM_ID,
createEnvironmentInjector,
isDevMode,
provid... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/mutation-options.test.ts | packages/angular-query-experimental/src/__tests__/mutation-options.test.ts | import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { provideZonelessChangeDetection } from '@angular/core'
import { TestBed } from '@angular/core/testing'
import { QueryClient } from '@tanstack/query-core'
import { sleep } from '@tanstack/query-test-utils'
import {
injectIsMutating,
inj... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-mutation.test.ts | packages/angular-query-experimental/src/__tests__/inject-mutation.test.ts | import {
ApplicationRef,
Component,
Injector,
input,
provideZonelessChangeDetection,
signal,
} from '@angular/core'
import { TestBed } from '@angular/core/testing'
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { By } from '@angular/platform-browser'
import { sleep } from ... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-is-mutating.test.ts | packages/angular-query-experimental/src/__tests__/inject-is-mutating.test.ts | import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { TestBed } from '@angular/core/testing'
import { Injector, provideZonelessChangeDetection } from '@angular/core'
import { sleep } from '@tanstack/query-test-utils'
import {
QueryClient,
injectIsMutating,
injectMutation,
provideTa... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-query.test-d.ts | packages/angular-query-experimental/src/__tests__/inject-query.test-d.ts | import { describe, expectTypeOf, it, test } from 'vitest'
import { sleep } from '@tanstack/query-test-utils'
import { injectQuery, queryOptions } from '..'
import type { Signal } from '@angular/core'
describe('initialData', () => {
describe('Config object overload', () => {
it('TData should always be defined whe... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-is-fetching.test.ts | packages/angular-query-experimental/src/__tests__/inject-is-fetching.test.ts | import { TestBed } from '@angular/core/testing'
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { Injector, provideZonelessChangeDetection } from '@angular/core'
import { sleep } from '@tanstack/query-test-utils'
import {
QueryClient,
injectIsFetching,
injectQuery,
provideTanSt... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/provide-tanstack-query.test.ts | packages/angular-query-experimental/src/__tests__/provide-tanstack-query.test.ts | import { TestBed } from '@angular/core/testing'
import { describe, expect, test } from 'vitest'
import { InjectionToken, provideZonelessChangeDetection } from '@angular/core'
import { QueryClient } from '@tanstack/query-core'
import { provideTanStackQuery } from '../providers'
describe('provideTanStackQuery', () => {
... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-infinite-query.test-d.ts | packages/angular-query-experimental/src/__tests__/inject-infinite-query.test-d.ts | import { TestBed } from '@angular/core/testing'
import { afterEach, beforeEach, describe, expectTypeOf, test, vi } from 'vitest'
import { provideZonelessChangeDetection } from '@angular/core'
import { sleep } from '@tanstack/query-test-utils'
import { QueryClient, injectInfiniteQuery, provideTanStackQuery } from '..'
i... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-infinite-query.test.ts | packages/angular-query-experimental/src/__tests__/inject-infinite-query.test.ts | import { TestBed } from '@angular/core/testing'
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { Injector, provideZonelessChangeDetection } from '@angular/core'
import { sleep } from '@tanstack/query-test-utils'
import { QueryClient, injectInfiniteQuery, provideTanStackQuery } from '.... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-mutation.test-d.ts | packages/angular-query-experimental/src/__tests__/inject-mutation.test-d.ts | import { describe, expectTypeOf, test } from 'vitest'
import { sleep } from '@tanstack/query-test-utils'
import { injectMutation } from '..'
import type { Signal } from '@angular/core'
describe('Discriminated union return type', () => {
test('data should be possibly undefined by default', () => {
const mutation ... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/infinite-query-options.test.ts | packages/angular-query-experimental/src/__tests__/infinite-query-options.test.ts | import { describe, expect, it } from 'vitest'
import { infiniteQueryOptions } from '../infinite-query-options'
import type { CreateInfiniteQueryOptions } from '../types'
describe('infiniteQueryOptions', () => {
it('should return the object received as a parameter without any modification.', () => {
const object... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/query-options.test.ts | packages/angular-query-experimental/src/__tests__/query-options.test.ts | import { describe, expect, it } from 'vitest'
import { queryOptions } from '../query-options'
import type { CreateQueryOptions } from '../types'
describe('queryOptions', () => {
it('should return the object received as a parameter without any modification.', () => {
const object: CreateQueryOptions = {
que... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/signal-proxy.test.ts | packages/angular-query-experimental/src/__tests__/signal-proxy.test.ts | import { isSignal, signal } from '@angular/core'
import { describe, expect, test } from 'vitest'
import { signalProxy } from '../signal-proxy'
describe('signalProxy', () => {
const inputSignal = signal({ fn: () => 'bar', baz: 'qux' })
const proxy = signalProxy(inputSignal)
test('should have computed fields', ()... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/test-utils.ts | packages/angular-query-experimental/src/__tests__/test-utils.ts | import { isSignal, untracked } from '@angular/core'
import { SIGNAL, signalSetFn } from '@angular/core/primitives/signals'
import { expect } from 'vitest'
import type { InputSignal, Signal } from '@angular/core'
import type { ComponentFixture } from '@angular/core/testing'
// Evaluate all signals on an object and retu... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/pending-tasks.test.ts | packages/angular-query-experimental/src/__tests__/pending-tasks.test.ts | import {
ApplicationRef,
Component,
provideZonelessChangeDetection,
} from '@angular/core'
import { TestBed } from '@angular/core/testing'
import { HttpClient, provideHttpClient } from '@angular/common/http'
import {
HttpTestingController,
provideHttpClientTesting,
} from '@angular/common/http/testing'
import... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-query.test.ts | packages/angular-query-experimental/src/__tests__/inject-query.test.ts | import {
ApplicationRef,
Component,
Injector,
computed,
effect,
input,
provideZonelessChangeDetection,
signal,
} from '@angular/core'
import { TestBed } from '@angular/core/testing'
import { HttpClient, provideHttpClient } from '@angular/common/http'
import {
HttpTestingController,
provideHttpClient... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/query-options.test-d.ts | packages/angular-query-experimental/src/__tests__/query-options.test-d.ts | import { assertType, describe, expectTypeOf, test } from 'vitest'
import { QueryClient, dataTagSymbol, injectQuery, queryOptions } from '..'
import type { Signal } from '@angular/core'
describe('queryOptions', () => {
test('should not allow excess properties', () => {
expectTypeOf(queryOptions).parameter(0).not.... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-mutation-state.test-d.ts | packages/angular-query-experimental/src/__tests__/inject-mutation-state.test-d.ts | import { describe, expectTypeOf, it } from 'vitest'
import { injectMutationState } from '..'
import type { MutationState, MutationStatus } from '..'
describe('injectMutationState', () => {
it('should default to QueryState', () => {
const result = injectMutationState(() => ({
filters: { status: 'pending' },... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/provide-query-client.test.ts | packages/angular-query-experimental/src/__tests__/provide-query-client.test.ts | import { TestBed } from '@angular/core/testing'
import { describe, expect, test } from 'vitest'
import { InjectionToken, provideZonelessChangeDetection } from '@angular/core'
import { QueryClient } from '@tanstack/query-core'
import { provideQueryClient } from '../providers'
describe('provideQueryClient', () => {
te... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-queries.test-d.ts | packages/angular-query-experimental/src/__tests__/inject-queries.test-d.ts | import { describe, expectTypeOf, it } from 'vitest'
import { skipToken } from '..'
import { injectQueries } from '../inject-queries'
import { queryOptions } from '../query-options'
import type { CreateQueryOptions, CreateQueryResult, OmitKeyof } from '..'
import type { Signal } from '@angular/core'
describe('InjectQue... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/infinite-query-options.test-d.ts | packages/angular-query-experimental/src/__tests__/infinite-query-options.test-d.ts | import { assertType, describe, expectTypeOf, it, test } from 'vitest'
import { QueryClient, dataTagSymbol } from '@tanstack/query-core'
import { infiniteQueryOptions } from '../infinite-query-options'
import { injectInfiniteQuery } from '../inject-infinite-query'
import { injectQuery } from '../inject-query'
import typ... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-mutation-state.test.ts | packages/angular-query-experimental/src/__tests__/inject-mutation-state.test.ts | import {
Component,
Injector,
input,
provideZonelessChangeDetection,
signal,
} from '@angular/core'
import { TestBed } from '@angular/core/testing'
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { By } from '@angular/platform-browser'
import { sleep } from '@tanstack/query-t... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/mutation-options.test-d.ts | packages/angular-query-experimental/src/__tests__/mutation-options.test-d.ts | import { assertType, describe, expectTypeOf, it } from 'vitest'
import { QueryClient } from '@tanstack/query-core'
import {
injectIsMutating,
injectMutation,
injectMutationState,
mutationOptions,
} from '..'
import type {
DefaultError,
MutationFunctionContext,
MutationState,
WithRequired,
} from '@tanst... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/__tests__/inject-queries.test.ts | packages/angular-query-experimental/src/__tests__/inject-queries.test.ts | import { beforeEach, describe, expect, it } from 'vitest'
import { render } from '@testing-library/angular'
import {
Component,
effect,
provideZonelessChangeDetection,
} from '@angular/core'
import { TestBed } from '@angular/core/testing'
import { queryKey } from '@tanstack/query-test-utils'
import { QueryClient,... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-experimental/src/inject-queries-experimental/index.ts | packages/angular-query-experimental/src/inject-queries-experimental/index.ts | export * from '../inject-queries'
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-persist-client/test-setup.ts | packages/angular-query-persist-client/test-setup.ts | import '@testing-library/jest-dom/vitest'
import { getTestBed } from '@angular/core/testing'
import {
BrowserTestingModule,
platformBrowserTesting,
} from '@angular/platform-browser/testing'
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting())
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-persist-client/tsup.config.ts | packages/angular-query-persist-client/tsup.config.ts | import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
sourcemap: true,
clean: true,
format: ['esm'],
dts: true,
outDir: 'build',
outExtension({ format }) {
return format === 'esm' ? { js: '.mjs' } : { js: '.js' }
},
})
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-persist-client/vite.config.ts | packages/angular-query-persist-client/vite.config.ts | import { defineConfig } from 'vitest/config'
import packageJson from './package.json'
export default defineConfig({
// fix from https://github.com/vitest-dev/vitest/issues/6992#issuecomment-2509408660
resolve: {
conditions: ['@tanstack/custom-condition'],
},
environments: {
ssr: {
resolve: {
... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-persist-client/src/with-persist-query-client.ts | packages/angular-query-persist-client/src/with-persist-query-client.ts | import {
QueryClient,
provideIsRestoring,
queryFeature,
} from '@tanstack/angular-query-experimental'
import {
DestroyRef,
ENVIRONMENT_INITIALIZER,
PLATFORM_ID,
inject,
signal,
} from '@angular/core'
import { isPlatformBrowser } from '@angular/common'
import {
persistQueryClientRestore,
persistQuery... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-persist-client/src/index.ts | packages/angular-query-persist-client/src/index.ts | // Re-export core
export * from '@tanstack/query-persist-client-core'
export * from './with-persist-query-client'
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/angular-query-persist-client/src/__tests__/with-persist-query-client.test.ts | packages/angular-query-persist-client/src/__tests__/with-persist-query-client.test.ts | import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import {
QueryClient,
injectQuery,
provideTanStackQuery,
} from '@tanstack/angular-query-experimental'
import { persistQueryClientSave } from '@tanstack/query-persist-client-core'
import {
Component,
effect,
provideZonelessChangeDete... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/svelte-query-persist-client/vite.config.ts | packages/svelte-query-persist-client/vite.config.ts | import { svelte } from '@sveltejs/vite-plugin-svelte'
import { defineConfig } from 'vitest/config'
import { svelteTesting } from '@testing-library/svelte/vite'
import packageJson from './package.json'
export default defineConfig({
plugins: [svelte(), svelteTesting()],
// fix from https://github.com/vitest-dev/vit... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/svelte-query-persist-client/src/index.ts | packages/svelte-query-persist-client/src/index.ts | // Re-export core
export * from '@tanstack/query-persist-client-core'
export { default as PersistQueryClientProvider } from './PersistQueryClientProvider.svelte'
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/svelte-query-persist-client/src/utils.svelte.ts | packages/svelte-query-persist-client/src/utils.svelte.ts | type Box<T> = { current: T }
export function box<T>(initial: T): Box<T> {
let current = $state(initial)
return {
get current() {
return current
},
set current(newValue) {
current = newValue
},
}
}
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/svelte-query-persist-client/tests/test-setup.ts | packages/svelte-query-persist-client/tests/test-setup.ts | import '@testing-library/jest-dom/vitest'
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.svelte.test.ts | packages/svelte-query-persist-client/tests/PersistQueryClientProvider.svelte.test.ts | import { render } from '@testing-library/svelte'
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { QueryClient } from '@tanstack/svelte-query'
import { persistQueryClientSave } from '@tanstack/query-persist-client-core'
import { sleep } from '@tanstack/query-test-utils'
import AwaitOnS... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/svelte-query-persist-client/tests/utils.svelte.ts | packages/svelte-query-persist-client/tests/utils.svelte.ts | export type StatusResult<T = unknown> = {
status: string
fetchStatus: string
data: T | undefined
}
export class StatelessRef<T> {
current: T
constructor(value: T) {
this.current = value
}
}
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/tsup.config.ts | packages/query-core/tsup.config.ts | import { defineConfig } from 'tsup'
import { legacyConfig, modernConfig } from './root.tsup.config.js'
export default defineConfig([
modernConfig({ entry: ['src/*.ts'] }),
legacyConfig({ entry: ['src/*.ts'] }),
])
| typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/vite.config.ts | packages/query-core/vite.config.ts | import { defineConfig } from 'vitest/config'
import packageJson from './package.json'
export default defineConfig({
// fix from https://github.com/vitest-dev/vitest/issues/6992#issuecomment-2509408660
resolve: {
conditions: ['@tanstack/custom-condition'],
},
environments: {
ssr: {
resolve: {
... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/query.ts | packages/query-core/src/query.ts | import {
ensureQueryFn,
noop,
replaceData,
resolveEnabled,
resolveStaleTime,
skipToken,
timeUntilStale,
} from './utils'
import { notifyManager } from './notifyManager'
import { CancelledError, canFetch, createRetryer } from './retryer'
import { Removable } from './removable'
import type { QueryCache } fr... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/removable.ts | packages/query-core/src/removable.ts | import { timeoutManager } from './timeoutManager'
import { isServer, isValidTimeout } from './utils'
import type { ManagedTimerId } from './timeoutManager'
export abstract class Removable {
gcTime!: number
#gcTimeout?: ManagedTimerId
destroy(): void {
this.clearGcTimeout()
}
protected scheduleGc(): voi... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/queriesObserver.ts | packages/query-core/src/queriesObserver.ts | import { notifyManager } from './notifyManager'
import { QueryObserver } from './queryObserver'
import { Subscribable } from './subscribable'
import { replaceEqualDeep, shallowEqualObjects } from './utils'
import type {
DefaultedQueryObserverOptions,
QueryObserverOptions,
QueryObserverResult,
} from './types'
imp... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/mutation.ts | packages/query-core/src/mutation.ts | import { notifyManager } from './notifyManager'
import { Removable } from './removable'
import { createRetryer } from './retryer'
import type {
DefaultError,
MutationFunctionContext,
MutationMeta,
MutationOptions,
MutationStatus,
} from './types'
import type { MutationCache } from './mutationCache'
import typ... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/retryer.ts | packages/query-core/src/retryer.ts | import { focusManager } from './focusManager'
import { onlineManager } from './onlineManager'
import { pendingThenable } from './thenable'
import { isServer, sleep } from './utils'
import type { Thenable } from './thenable'
import type { CancelOptions, DefaultError, NetworkMode } from './types'
// TYPES
interface Ret... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/mutationCache.ts | packages/query-core/src/mutationCache.ts | import { notifyManager } from './notifyManager'
import { Mutation } from './mutation'
import { matchMutation, noop } from './utils'
import { Subscribable } from './subscribable'
import type { MutationObserver } from './mutationObserver'
import type {
DefaultError,
MutationFunctionContext,
MutationOptions,
Notif... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/focusManager.ts | packages/query-core/src/focusManager.ts | import { Subscribable } from './subscribable'
import { isServer } from './utils'
type Listener = (focused: boolean) => void
type SetupFn = (
setFocused: (focused?: boolean) => void,
) => (() => void) | undefined
export class FocusManager extends Subscribable<Listener> {
#focused?: boolean
#cleanup?: () => void... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/utils.ts | packages/query-core/src/utils.ts | import { timeoutManager } from './timeoutManager'
import type {
DefaultError,
Enabled,
FetchStatus,
MutationKey,
MutationStatus,
QueryFunction,
QueryKey,
QueryOptions,
StaleTime,
StaleTimeFunction,
} from './types'
import type { Mutation } from './mutation'
import type { FetchOptions, Query } from '... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/notifyManager.ts | packages/query-core/src/notifyManager.ts | // TYPES
import { systemSetTimeoutZero } from './timeoutManager'
type NotifyCallback = () => void
type NotifyFunction = (callback: () => void) => void
type BatchNotifyFunction = (callback: () => void) => void
type BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void
type ScheduleFunction = (callbac... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/timeoutManager.ts | packages/query-core/src/timeoutManager.ts | /**
* {@link TimeoutManager} does not support passing arguments to the callback.
*
* `(_: void)` is the argument type inferred by TypeScript's default typings for
* `setTimeout(cb, number)`.
* If we don't accept a single void argument, then
* `new Promise(resolve => timeoutManager.setTimeout(resolve, N))` is a ty... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/queryObserver.ts | packages/query-core/src/queryObserver.ts | import { focusManager } from './focusManager'
import { notifyManager } from './notifyManager'
import { fetchState } from './query'
import { Subscribable } from './subscribable'
import { pendingThenable } from './thenable'
import {
isServer,
isValidTimeout,
noop,
replaceData,
resolveEnabled,
resolveStaleTime... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/infiniteQueryObserver.ts | packages/query-core/src/infiniteQueryObserver.ts | import { QueryObserver } from './queryObserver'
import {
hasNextPage,
hasPreviousPage,
infiniteQueryBehavior,
} from './infiniteQueryBehavior'
import type { Subscribable } from './subscribable'
import type {
DefaultError,
DefaultedInfiniteQueryObserverOptions,
FetchNextPageOptions,
FetchPreviousPageOption... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/mutationObserver.ts | packages/query-core/src/mutationObserver.ts | import { getDefaultState } from './mutation'
import { notifyManager } from './notifyManager'
import { Subscribable } from './subscribable'
import { hashKey, shallowEqualObjects } from './utils'
import type { QueryClient } from './queryClient'
import type {
DefaultError,
MutateOptions,
MutationFunctionContext,
M... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/queryCache.ts | packages/query-core/src/queryCache.ts | import { hashQueryKeyByOptions, matchQuery } from './utils'
import { Query } from './query'
import { notifyManager } from './notifyManager'
import { Subscribable } from './subscribable'
import type { QueryFilters } from './utils'
import type { Action, QueryState } from './query'
import type {
DefaultError,
NotifyEv... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/infiniteQueryBehavior.ts | packages/query-core/src/infiniteQueryBehavior.ts | import {
addConsumeAwareSignal,
addToEnd,
addToStart,
ensureQueryFn,
} from './utils'
import type { QueryBehavior } from './query'
import type {
InfiniteData,
InfiniteQueryPageParamsOptions,
OmitKeyof,
QueryFunctionContext,
QueryKey,
} from './types'
export function infiniteQueryBehavior<TQueryFnData... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/onlineManager.ts | packages/query-core/src/onlineManager.ts | import { Subscribable } from './subscribable'
import { isServer } from './utils'
type Listener = (online: boolean) => void
type SetupFn = (setOnline: Listener) => (() => void) | undefined
export class OnlineManager extends Subscribable<Listener> {
#online = true
#cleanup?: () => void
#setup: SetupFn
constru... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/types.ts | packages/query-core/src/types.ts | /* istanbul ignore file */
import type { QueryClient } from './queryClient'
import type { DehydrateOptions, HydrateOptions } from './hydration'
import type { MutationState } from './mutation'
import type { FetchDirection, Query, QueryBehavior } from './query'
import type { RetryDelayValue, RetryValue } from './retryer... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | true |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/index.ts | packages/query-core/src/index.ts | /* istanbul ignore file */
export { focusManager } from './focusManager'
export {
defaultShouldDehydrateMutation,
defaultShouldDehydrateQuery,
dehydrate,
hydrate,
} from './hydration'
export { InfiniteQueryObserver } from './infiniteQueryObserver'
export { MutationCache } from './mutationCache'
export type { M... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/subscribable.ts | packages/query-core/src/subscribable.ts | export class Subscribable<TListener extends Function> {
protected listeners = new Set<TListener>()
constructor() {
this.subscribe = this.subscribe.bind(this)
}
subscribe(listener: TListener): () => void {
this.listeners.add(listener)
this.onSubscribe()
return () => {
this.listeners.del... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/thenable.ts | packages/query-core/src/thenable.ts | /**
* Thenable types which matches React's types for promises
*
* React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises
*
* @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138
* @see https://github.com/faceb... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/hydration.ts | packages/query-core/src/hydration.ts | import { tryResolveSync } from './thenable'
import { noop } from './utils'
import type {
DefaultError,
MutationKey,
MutationMeta,
MutationOptions,
MutationScope,
QueryKey,
QueryMeta,
QueryOptions,
} from './types'
import type { QueryClient } from './queryClient'
import type { Query, QueryState } from '.... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/streamedQuery.ts | packages/query-core/src/streamedQuery.ts | import { addConsumeAwareSignal, addToEnd } from './utils'
import type {
OmitKeyof,
QueryFunction,
QueryFunctionContext,
QueryKey,
} from './types'
type BaseStreamedQueryParams<TQueryFnData, TQueryKey extends QueryKey> = {
streamFn: (
context: QueryFunctionContext<TQueryKey>,
) => AsyncIterable<TQueryFn... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/queryClient.ts | packages/query-core/src/queryClient.ts | import {
functionalUpdate,
hashKey,
hashQueryKeyByOptions,
noop,
partialMatchKey,
resolveStaleTime,
skipToken,
} from './utils'
import { QueryCache } from './queryCache'
import { MutationCache } from './mutationCache'
import { focusManager } from './focusManager'
import { onlineManager } from './onlineMan... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/__tests__/onlineManager.test.tsx | packages/query-core/src/__tests__/onlineManager.test.tsx | import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { OnlineManager } from '../onlineManager'
import { setIsServer } from './utils'
describe('onlineManager', () => {
let onlineManager: OnlineManager
beforeEach(() => {
vi.useFakeTimers()
onlineManager = new OnlineManager()
}... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/__tests__/queryCache.test.tsx | packages/query-core/src/__tests__/queryCache.test.tsx | import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { queryKey, sleep } from '@tanstack/query-test-utils'
import { QueryCache, QueryClient, QueryObserver } from '..'
describe('queryCache', () => {
let queryClient: QueryClient
let queryCache: QueryCache
beforeEach(() => {
vi.use... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/__tests__/queryObserver.test.tsx | packages/query-core/src/__tests__/queryObserver.test.tsx | import {
afterEach,
beforeEach,
describe,
expect,
expectTypeOf,
it,
test,
vi,
} from 'vitest'
import { queryKey, sleep } from '@tanstack/query-test-utils'
import { QueryClient, QueryObserver, focusManager } from '..'
import type { QueryObserverResult } from '..'
describe('queryObserver', () => {
let ... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | true |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/__tests__/infiniteQueryObserver.test.tsx | packages/query-core/src/__tests__/infiniteQueryObserver.test.tsx | import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { queryKey, sleep } from '@tanstack/query-test-utils'
import { InfiniteQueryObserver, QueryClient } from '..'
import type {
DefaultedInfiniteQueryObserverOptions,
InfiniteData,
} from '../types'
describe('InfiniteQueryObserver', () =... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/__tests__/queryClient.test.tsx | packages/query-core/src/__tests__/queryClient.test.tsx | import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { queryKey, sleep } from '@tanstack/query-test-utils'
import {
CancelledError,
MutationObserver,
QueryClient,
QueryObserver,
dehydrate,
focusManager,
hydrate,
onlineManager,
skipToken,
} from '..'
import { mockOnlineMana... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | true |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/__tests__/infiniteQueryObserver.test-d.tsx | packages/query-core/src/__tests__/infiniteQueryObserver.test-d.tsx | import { afterEach, beforeEach, describe, expectTypeOf, it, vi } from 'vitest'
import { queryKey } from '@tanstack/query-test-utils'
import { InfiniteQueryObserver, QueryClient } from '..'
import type { InfiniteData } from '..'
describe('InfiniteQueryObserver', () => {
let queryClient: QueryClient
beforeEach(() =... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/__tests__/utils.ts | packages/query-core/src/__tests__/utils.ts | import { vi } from 'vitest'
import { onlineManager } from '..'
import * as utils from '../utils'
import type { MockInstance } from 'vitest'
import type { MutationOptions, QueryClient } from '..'
export function mockOnlineManagerIsOnline(
value: boolean,
): MockInstance<() => boolean> {
return vi.spyOn(onlineManage... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/__tests__/notifyManager.test.tsx | packages/query-core/src/__tests__/notifyManager.test.tsx | import {
afterEach,
assertType,
beforeEach,
describe,
expect,
expectTypeOf,
it,
vi,
} from 'vitest'
import { sleep } from '@tanstack/query-test-utils'
import { createNotifyManager } from '../notifyManager'
describe('notifyManager', () => {
beforeEach(() => {
vi.useFakeTimers()
})
afterEach((... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/__tests__/utils.test.tsx | packages/query-core/src/__tests__/utils.test.tsx | import { describe, expect, it, vi } from 'vitest'
import { QueryClient } from '..'
import {
addToEnd,
addToStart,
hashKey,
hashQueryKeyByOptions,
isPlainArray,
isPlainObject,
keepPreviousData,
matchMutation,
partialMatchKey,
replaceEqualDeep,
shallowEqualObjects,
shouldThrowError,
} from '../uti... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
TanStack/query | https://github.com/TanStack/query/blob/f61647443da43639c58208d22ae8897b811d5dfc/packages/query-core/src/__tests__/streamedQuery.test.tsx | packages/query-core/src/__tests__/streamedQuery.test.tsx | import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { queryKey, sleep } from '@tanstack/query-test-utils'
import { streamedQuery } from '../streamedQuery'
import { QueryClient, QueryObserver } from '..'
describe('streamedQuery', () => {
let queryClient: QueryClient
beforeEach(() => {... | typescript | MIT | f61647443da43639c58208d22ae8897b811d5dfc | 2026-01-04T15:39:01.376912Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.