This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { QueryKey, UseQueryOptions } from "@tanstack/react-query"; | |
| import { mutationOptions } from "@tanstack/react-query"; | |
| import { queryClient } from "./clients"; | |
| type AnyQueryOptions = UseQueryOptions<any, any, any, any>; | |
| type InferQueryData<TFactory extends () => AnyQueryOptions> = | |
| ReturnType<TFactory> extends UseQueryOptions<infer TData, any, any, any> ? TData : never; | |
| type InferQueryError<TFactory extends () => AnyQueryOptions> = | |
| ReturnType<TFactory> extends UseQueryOptions<any, infer TError, any, any> ? TError : never; |