/** * @since 0.0.1 */ import { Either } from "fp-ts/Either"; import { StatusError } from "./Error.js"; import { Adapter, Fetch, Init } from "./Fetch.js"; import { InterceptorError, Interceptors } from "./Interceptor.js"; import { TimeoutError } from "./Interceptors/Timeout.js"; import { HttpError } from "./internal/error.js"; /** @internal */ export type Config = { url?: string; adapter: Adapter; timeout?: number; headers?: RequestInit["headers"]; interceptors?: Interceptors; }; /** @internal */ export type Handler = (fetch: Fetch) => (url: string | URL, init?: Init | undefined) => Promise>; /** * @since 0.0.1 * @category model */ export interface Client extends Fetch, Record<"get" | "put" | "post" | "patch" | "head" | "options" | "delete", ReturnType>> { } /** * @since 0.0.1 * @category constructor */ export declare const create: { (config: Config & Omit, "url" | "headers"> & ({ url: string; } | { headers: RequestInit["headers"]; })): Client; (config: Config & Omit, "timeout"> & { timeout: number; }): Client; (config: Config): Client; };