UNPKG

822 BTypeScriptView Raw
1export declare type JSONBodyInit = BodyInit | any;
2export declare type JSONRequestInit = {
3 body?: JSONBodyInit | null;
4} & Omit<RequestInit, 'body'>;
5export declare class JSONRequest extends Request {
6 static contentType: string;
7 static accept: string;
8 constructor(input: RequestInfo | URL, init?: JSONRequestInit, replacer?: Parameters<typeof JSON.stringify>[1], space?: Parameters<typeof JSON.stringify>[2]);
9}
10export declare class JSONResponse extends Response {
11 static contentType: string;
12 constructor(body?: JSONBodyInit | null, init?: ResponseInit, replacer?: Parameters<typeof JSON.stringify>[1], space?: Parameters<typeof JSON.stringify>[2]);
13}
14export declare function jsonFetch(...args: ConstructorParameters<typeof JSONRequest>): Promise<Response>;
15export * from './search-params-url.js';