import { BaseError } from 'make-error'; /** * Thrown by a FetchRequestFactory if one of the async request initialization steps fails. */ export declare class FetchRequestFactoryError extends BaseError { readonly error: Error | string | unknown; constructor(error: Error | string | unknown); } /** * Wraps the input fetch function to always pass the fetch response promise to requireOkResponse(). * * @param inputFetch * @returns */ export declare function fetchOk(inputFetch: typeof fetch): typeof fetch; export declare class FetchResponseError extends BaseError { readonly response: Response; constructor(response: Response); } /** * Asserts that the fetch response has an ok status code, throwing a FetchResponseError if it does not. * * @param responsePromise - promise resolving to the fetch Response to validate * @returns a promise resolving to the Response if the status is ok */ export declare function requireOkResponse(responsePromise: Promise): Promise;