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