edge-mock
Version:
types for testing an developer edge applications
19 lines (18 loc) • 843 B
TypeScript
declare type BodyInitNotStream = Blob | BufferSource | FormData | URLSearchParams | string;
export declare class EdgeBody implements Body {
protected _formBoundary?: string;
protected _stream: ReadableStream<Uint8Array> | null;
constructor(content: BodyInit | null | undefined, formBoundary?: string);
get body(): ReadableStream | null;
get bodyUsed(): boolean;
arrayBuffer(): Promise<ArrayBuffer>;
blob(): Promise<Blob>;
json(): Promise<any>;
text(): Promise<string>;
formData(): Promise<FormData>;
protected _text(): Promise<string>;
protected _check_used(name: string): void;
protected _bodyToArrayBufferView(body: BodyInitNotStream): Promise<ArrayBufferView>;
}
export declare function findBoundary(headers: Headers, content: BodyInit | null | undefined): string | undefined;
export {};