shelving
Version:
Toolkit for using data in JavaScript.
11 lines (10 loc) • 741 B
TypeScript
import type { AnyCaller } from "../../util/function.js";
import type { RequestOptions } from "../../util/http.js";
import type { Endpoint } from "../endpoint/Endpoint.js";
import { ThroughAPIProvider } from "./ThroughAPIProvider.js";
/** Provider that logs everything to the console in some detail to help diagnose issues in development. */
export declare class DebugAPIProvider<P, R> extends ThroughAPIProvider<P, R> {
createRequest<PP extends P, RR extends R>(endpoint: Endpoint<PP, RR>, payload: PP, options?: RequestOptions, caller?: AnyCaller): Request;
fetch(request: Request): Promise<Response>;
parseResponse<PP extends P, RR extends R>(endpoint: Endpoint<PP, RR>, response: Response, caller?: AnyCaller): Promise<RR>;
}