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

hydration-state-key.ts

16 lines512 Bytes

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