import type { ArgsOrVoid, IResource, TSuspenseResourceState } from "../../query/types/index.js"; /** * Suspense-enabled variant of `useResource`. * * Instead of returning loading/error flags, the hook integrates with React * Suspense and Error Boundaries: * - while the initial query is in flight it throws a promise → the nearest * `` is shown; * - if the initial query fails with nothing to fall back on it throws the error * → the nearest Error Boundary catches it; * - otherwise it returns the resolved state with `data` guaranteed non-null. * * Background refreshes (SWR) never suspend: stale data stays on screen while * `isRefreshing` / `isRefreshError` let the UI render inline indicators. * * `SKIP` is intentionally unsupported — a component that may suspend must always * have arguments. For conditional queries use `useResource`. * * @param resource - The resource to observe. * @param args - Query arguments (or `void` when `TArgs` is `void`). * @returns The settled resource state with non-null `data`. */ export declare function useSuspenseResource(resource: IResource, args: ArgsOrVoid): TSuspenseResourceState;