interface ParseableResponse { ok: boolean; status: number; headers: { get(name: string): string | null | undefined; }; json(): Promise; text(): Promise; } /** * Parses an HTTP response as JSON or text based on its content type. * * @param response - The HTTP response object from the fetch API. * @returns A promise that resolves with the parsed data, either as an object or a string. * @throws Throws an error if the response is not ok. The error message is derived from the parsed data, * using the "detail" or "message" property if available on an object, or by stringifying the object or using the text directly. */ export declare const parseResponse: (response: ParseableResponse) => Promise; export {};