import { AsyncState, AsyncMode } from './types'; /** * Extract data from AsyncState, throws if not ready. * - Success: returns data * - Stale mode (idle/pending/error with data): returns stale data * - Pending with promise: throws promise (for Suspense) * - Otherwise: throws error or AsyncNotReadyError */ export declare function wait(state: AsyncState): M extends "stale" ? T : T; /** * Check if state has data available (success or stale). */ export declare function hasData(state: AsyncState): state is AsyncState & { data: T; }; /** * Check if state is loading (pending status). */ export declare function isLoading(state: AsyncState): state is AsyncState & { status: "pending"; }; /** * Check if state has an error. */ export declare function isError(state: AsyncState): state is AsyncState & { status: "error"; error: Error; }; //# sourceMappingURL=wait.d.ts.map