import { ErrorTypes } from '@rest-hooks/core'; import { Schema, Denormalize, DenormalizeNullable, EndpointInterface, FetchFunction } from '@rest-hooks/react'; import { ParamsFromShape, ReadShape } from './endpoint/index.js'; type CondNull = P extends null ? A : B; type StatefulReturn = CondNull; loading: false; error: undefined; }, { data: Denormalize; loading: false; error: undefined; } | { data: DenormalizeNullable; loading: true; error: undefined; } | { data: DenormalizeNullable; loading: false; error: ErrorTypes; }>; /** * Ensure a resource is available; loading and error returned explicitly. * @see https://resthooks.io/docs/guides/no-suspense */ export default function useStatefulResource | ReadShape, Args extends (E extends (...args: any) => any ? readonly [ ...Parameters ] : readonly [ ParamsFromShape ]) | readonly [ null ]>(endpoint: E, ...args: Args): StatefulReturn; export {}; //# sourceMappingURL=useStatefulResource.d.ts.map