export type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial } : T export type WithRequired = Omit & Required> export type WithPatrial = Omit & Partial> export type Override = { [K in keyof A]: K extends keyof B ? B[K] : A[K] } export type GetVariablesOption = TVars extends void ? { variables?: TVars } : { variables: TVars } export type DataUpdateFunction = (input: TInput) => TOutput export type Updater = | TOutput | DataUpdateFunction export interface QueryMeta { [index: string]: unknown } export type FetchDirection = 'forward' | 'backward' export type QueryFunctionContext = [TPageParam] extends [ never ] ? { signal: AbortSignal meta: QueryMeta | undefined } : { signal: AbortSignal pageParam: TPageParam direction: FetchDirection meta: QueryMeta | undefined } export type QueryFunction< TFetcherData = unknown, TVars = unknown, TPageParam = never > = ( variables: TVars, context: QueryFunctionContext ) => TFetcherData | Promise export interface FetchMeta { fetchMore?: { direction: FetchDirection } } export type NotifyEventType = 'added' | 'removed' | 'updated' export interface NotifyEvent { type: NotifyEventType }