the-forest/client/node_modules/@tanstack/react-query/build/legacy/queryOptions.js.map
2024-09-17 20:35:18 -04:00

1 line
1.8 KiB
Plaintext

{"version":3,"sources":["../../src/queryOptions.ts"],"sourcesContent":["import type {\n DataTag,\n DefaultError,\n InitialDataFunction,\n QueryKey,\n} from '@tanstack/query-core'\nimport type { UseQueryOptions } from './types'\n\nexport type UndefinedInitialDataOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n initialData?: undefined | InitialDataFunction<NonUndefinedGuard<TQueryFnData>>\n}\n\ntype NonUndefinedGuard<T> = T extends undefined ? never : T\n\nexport type DefinedInitialDataOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n initialData:\n | NonUndefinedGuard<TQueryFnData>\n | (() => NonUndefinedGuard<TQueryFnData>)\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>,\n): DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TQueryFnData>\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>,\n): UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TQueryFnData>\n}\n\nexport function queryOptions(options: unknown) {\n return options\n}\n"],"mappings":";AAoDO,SAAS,aAAa,SAAkB;AAC7C,SAAO;AACT;","names":[]}