import { prepass, getFields, getArrayFields, selectFields, castNotSkeleton, castNotSkeletonDeep } from 'gqless'; import { BuildSelectionInput, GQlessError, ResolveOptions, Selection } from 'gqless'; import { ProxyAccessor } from 'gqless/dist/Cache'; import { EventHandler } from 'gqless/dist/Events'; import { InterceptorManager } from 'gqless/dist/Interceptor'; import { Scheduler } from 'gqless/dist/Scheduler'; import { MutableRefObject, useEffect, useLayoutEffect } from 'react'; export declare function useOnFirstMount(fn: () => void): void; export declare const IS_BROWSER: boolean; export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect; export declare function useForceUpdate(): (() => void) & { wasCalled: MutableRefObject; }; export declare function useLazyRef(initialValFunc: () => T): MutableRefObject; export declare const useUpdateEffect: typeof useEffect; export declare function useIsRendering(): MutableRefObject; export declare function useIsMounted(): MutableRefObject; export declare function useDeferDispatch void>(dispatchFn: F): F; export declare type FetchPolicy = 'cache-and-network' | 'cache-first' | 'network-only' | 'no-cache'; export declare function fetchPolicyDefaultResolveOptions(fetchPolicy: FetchPolicy | undefined): ResolveOptions; export declare type BuildSelections = (Selection | BuildSelectionInput | T)[]; export declare function useBuildSelections(argSelections: BuildSelections | null | undefined, buildSelection: (...args: BuildSelectionInput) => Selection, getProxySelection: (proxy: ProxyAccessor) => Selection | undefined, caller: Function): { selections: Set; hasSpecifiedSelections: boolean; }; export declare type List = Set | Array; export declare function toSetIfNeeded(list: List): Set; export declare function isSelectionIncluded(selection: Selection, selectionList: List): boolean; export declare function isAnySelectionIncluded(selectionsToCheck: List, selectionsList: List): boolean; export declare function isAnySelectionIncludedInMatrix(selectionsToCheck: List, selectionsMatrix: List>): boolean; export declare function useSelectionsState(): Set; export declare function useSubscribeCacheChanges({ hookSelections, eventHandler, onChange, shouldSubscribe, }: { hookSelections: Set; eventHandler: EventHandler; onChange: () => void; shouldSubscribe?: boolean; }): void; export declare function useInterceptSelections({ interceptorManager: { globalInterceptor, createInterceptor, removeInterceptor, }, staleWhileRevalidate, scheduler, eventHandler, onError, updateOnFetchPromise, }: { staleWhileRevalidate: boolean | object | number | string | null; interceptorManager: InterceptorManager; scheduler: Scheduler; eventHandler: EventHandler; onError: OnErrorHandler | undefined; updateOnFetchPromise?: boolean; }): { fetchingPromise: MutableRefObject | null>; unsubscribe: () => void; }; export declare function useSuspensePromise(optsRef: { current: { suspense?: boolean; }; }): (promise: Promise, inlineThrow?: boolean | undefined) => void; export declare type OnErrorHandler = (error: GQlessError) => void; export interface CoreHelpers { prepass: typeof prepass; getFields: typeof getFields; getArrayFields: typeof getArrayFields; selectFields: typeof selectFields; castNotSkeleton: typeof castNotSkeleton; castNotSkeletonDeep: typeof castNotSkeletonDeep; } export declare const coreHelpers: CoreHelpers; export declare function uniqBy(list: TNode[], cb?: (node: TNode) => unknown): TNode[]; export declare function sortBy(list: TNode[], cb: (node: TNode) => number | string, order?: 'asc' | 'desc'): TNode[];