UNPKG

817 BTypeScriptView Raw
1import type { Operation } from "../core/index.js";
2import type { SubscriptionObserver } from "zen-observable-ts";
3export type ServerParseError = Error & {
4 response: Response;
5 statusCode: number;
6 bodyText: string;
7};
8export declare function readMultipartBody<T extends object = Record<string, unknown>>(response: Response, nextValue: (value: T) => void): Promise<void>;
9export declare function parseHeaders(headerText: string): Record<string, string>;
10export declare function parseJsonBody<T>(response: Response, bodyText: string): T;
11export declare function handleError(err: any, observer: SubscriptionObserver<any>): void;
12export declare function parseAndCheckHttpResponse(operations: Operation | Operation[]): (response: Response) => Promise<any>;
13//# sourceMappingURL=parseAndCheckHttpResponse.d.ts.map
\No newline at end of file