import { Buffer } from 'node:buffer'; import { Readable } from 'node:stream'; import { MaybePromise } from '@whatwg-node/promise-helpers'; import { PonyfillBlob } from './Blob.js'; import { PonyfillFormData } from './FormData.js'; import { PonyfillReadableStream } from './ReadableStream.js'; export type BodyPonyfillInit = XMLHttpRequestBodyInit | Readable | PonyfillReadableStream | AsyncIterable; export interface FormDataLimits { fieldNameSize?: number; fieldSize?: number; fields?: number; fileSize?: number; files?: number; parts?: number; headerSize?: number; } export interface PonyfillBodyOptions { formDataLimits?: FormDataLimits; signal?: AbortSignal | undefined; } export declare class PonyfillBody implements Body { private bodyInit; private options; bodyUsed: boolean; contentType: string | null; contentLength: number | null; _signal?: AbortSignal | null; constructor(bodyInit: BodyPonyfillInit | null, options?: PonyfillBodyOptions); private bodyType?; private _bodyFactory; private _generatedBody; private _buffer?; private generateBody; protected handleContentLengthHeader(this: PonyfillBody & { headers: Headers; }, forceSet?: boolean): void; get body(): PonyfillReadableStream | null; _chunks: MaybePromise | null; _doCollectChunksFromReadableJob(): MaybePromise[]>; _collectChunksFromReadable(): MaybePromise[]>; _blob: PonyfillBlob | null; blob(): Promise; _formData: PonyfillFormData | null; formData(opts?: { formDataLimits: FormDataLimits; }): Promise; buffer(): Promise; bytes(): Promise; arrayBuffer(): Promise; _json: TJSON | null; json(): Promise; _text: string | null; text(): Promise; }