//#region src/lib/request.d.ts /** * A universal API to make network requests. A subset of the `fetch()` API. * * {@link https://developer.mozilla.org/en-US/docs/Web/API/fetch} */ type FetchLike = (input: string, init?: RequestInitLike) => Promise; /** * An object that allows you to abort a `fetch()` request if needed via an `AbortController` object * * {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal} */ type AbortSignalLike = any; /** A subset of RequestInit properties to configure a `fetch()` request. */ interface RequestInitLike extends Pick { /** The HTTP method to use for the request. */ method?: string; /** The request body to send with the request. */ body?: any | FormData | string; /** An object literal to set the `fetch()` request's headers. */ headers?: Record; /** * An AbortSignal to set the `fetch()` request's signal. * * See: * [https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) */ signal?: AbortSignalLike; } /** The minimum required properties from Response. */ interface ResponseLike { ok: boolean; status: number; headers: HeadersLike; url: string; json(): Promise; text(): Promise; arrayBuffer(): Promise; blob(): Promise; clone(): ResponseLike; } /** The minimum required properties from Headers. */ interface HeadersLike { get(name: string): string | null; } //#endregion export { AbortSignalLike, FetchLike, RequestInitLike, ResponseLike }; //# sourceMappingURL=request.d.ts.map