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

hydration-state-key.ts

13 lines536 Bytes

1import { InjectionToken, makeStateKey } from '@angular/core'
2import type {StateKey} from '@angular/core';
3import type { DehydratedState } from '@tanstack/query-core'
4​
5export const INTERNAL_TANSTACK_QUERY_HYDRATION_STATE_KEY =
6 makeStateKey<DehydratedState>('tanstack-query-hydration-state')
7​
8export const INTERNAL_TANSTACK_QUERY_HYDRATION_TRANSFER_KEY = new InjectionToken<
9 StateKey<DehydratedState>
10>('tanstack-query-hydration-transfer-key', {
11 providedIn: 'root',
12 factory: () => INTERNAL_TANSTACK_QUERY_HYDRATION_STATE_KEY,
13})