UNPKG

wretch

Version:

A tiny wrapper built around fetch with an intuitive syntax.

12 lines (11 loc) 477 B
import type { Wretch, WretchResponse, WretchError as WretchErrorType } from "./types.js"; /** * This class inheriting from Error is thrown when the fetch response is not "ok". * It extends Error and adds status, text and body fields. */ export declare class WretchError extends Error implements WretchErrorType { status: number; response: WretchResponse; url: string; } export declare const resolver: <T, Chain, R, E>(wretch: T & Wretch<T, Chain, R, E>) => any;