From d618f59e52836ed3ec794a5187bf1199e1f0408c Mon Sep 17 00:00:00 2001 From: Nick Lucas Date: Sun, 29 Dec 2024 19:13:57 +0000 Subject: [PATCH] A different experiment --- packages/query-core/src/symbols.ts | 6 ++++++ packages/query-core/src/types.ts | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 packages/query-core/src/symbols.ts diff --git a/packages/query-core/src/symbols.ts b/packages/query-core/src/symbols.ts new file mode 100644 index 00000000000..ed3b46b69f4 --- /dev/null +++ b/packages/query-core/src/symbols.ts @@ -0,0 +1,6 @@ +export const dataTagSymbol = Symbol('dataTagSymbol') +export type dataTagSymbol = typeof dataTagSymbol +export const dataTagErrorSymbol = Symbol('dataTagErrorSymbol') +export type dataTagErrorSymbol = typeof dataTagErrorSymbol +export const unsetMarker = Symbol('unsetMarker') +export type UnsetMarker = typeof unsetMarker diff --git a/packages/query-core/src/types.ts b/packages/query-core/src/types.ts index ce139b04d9a..3aa99d280d3 100644 --- a/packages/query-core/src/types.ts +++ b/packages/query-core/src/types.ts @@ -1,5 +1,6 @@ /* istanbul ignore file */ +import type { UnsetMarker, dataTagErrorSymbol, dataTagSymbol } from './symbols' import type { DehydrateOptions, HydrateOptions } from './hydration' import type { MutationState } from './mutation' import type { FetchDirection, Query, QueryBehavior } from './query' @@ -42,12 +43,6 @@ export type DefaultError = Register extends { export type QueryKey = ReadonlyArray -export const dataTagSymbol = Symbol('dataTagSymbol') -export type dataTagSymbol = typeof dataTagSymbol -export const dataTagErrorSymbol = Symbol('dataTagErrorSymbol') -export type dataTagErrorSymbol = typeof dataTagErrorSymbol -export const unsetMarker = Symbol('unsetMarker') -export type UnsetMarker = typeof unsetMarker export type AnyDataTag = { [dataTagSymbol]: any [dataTagErrorSymbol]: any