export interface ResourceState { data: T | undefined; isLoading: boolean; error: Error | null; refetch: () => void; /** * True once `isLoading` has stayed on for `stuckAfterMs` without landing. * Whatever the exact timing race (an aborted fetch racing a remount, a * slow/hung request), a caller needs a way OUT — a spinner with no escape * hatch is a dead end. This never claims to know WHY the fetch is stuck; * it only tells the caller long enough has passed to offer a retry * instead of an indefinite loading state. */ stuck: boolean; } export declare function useResource(fetcher: (signal: AbortSignal) => Promise, deps: ReadonlyArray, options?: { refetchInterval?: number; enabled?: boolean; /** Threshold in ms before `stuck` flips true. Default 8000. */ stuckAfterMs?: number; }): ResourceState; export interface MutationState { mutateAsync: (args: TArgs) => Promise; isPending: boolean; error: Error | null; } export declare function useMutation(fn: (args: TArgs) => Promise): MutationState; //# sourceMappingURL=use-resource.d.ts.map