Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

stub.ts

13 lines545 Bytes

1import { makeEnvironmentProviders } from '@angular/core'
2import { queryFeature } from '@tanstack/angular-query/internal'
3import type { DevtoolsOptions, WithDevtools, WithDevtoolsFn } from './types'
4​
5// Stub which replaces `withDevtools` in production builds
6/**
7 * Provides an inert Query feature for production builds.
8 * @returns A feature that creates no devtools or subscriptions.
9 */
10export const withDevtools: WithDevtools = () =>
11 queryFeature(makeEnvironmentProviders([]))
12​
13export type { DevtoolsOptions, WithDevtools, WithDevtoolsFn }