import type { Schema, NetworkError, EndpointInterface, UnknownError, FetchFunction } from '@rest-hooks/react'; import { ReadShape, ParamsFromShape } from '../endpoint/index.js'; export type ErrorTypes = NetworkError | UnknownError; type UseErrorReturn

= P extends [null] ? undefined : ErrorTypes | undefined; /** * Get any errors for a given request * @see https://resthooks.io/docs/api/useError */ export default function useError, 'key' | 'schema' | 'invalidIfStale'> | Pick, 'getFetchKey' | 'schema' | 'options'>, Args extends (E extends { key: any; } ? readonly [...Parameters] : readonly [ParamsFromShape]) | readonly [null]>(endpoint: E, ...args: Args): UseErrorReturn; export {}; //# sourceMappingURL=useError.d.ts.map