export declare function polyfillProgressEvent(): { new (type: string, eventInitDict?: ProgressEventInit): ProgressEvent; prototype: ProgressEvent; } | { new (type: string, { lengthComputable, total, loaded, ...meta }?: ProgressEventInit): { target: T | null; lengthComputable: boolean; total: number; loaded: number; readonly bubbles: boolean; cancelBubble: boolean; readonly cancelable: boolean; readonly composed: boolean; readonly currentTarget: EventTarget | null; readonly defaultPrevented: boolean; readonly eventPhase: number; readonly isTrusted: boolean; returnValue: boolean; readonly srcElement: EventTarget | null; readonly timeStamp: DOMHighResTimeStamp; readonly type: string; composedPath(): EventTarget[]; initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void; preventDefault(): void; stopImmediatePropagation(): void; stopPropagation(): void; readonly NONE: 0; readonly CAPTURING_PHASE: 1; readonly AT_TARGET: 2; readonly BUBBLING_PHASE: 3; }; readonly NONE: 0; readonly CAPTURING_PHASE: 1; readonly AT_TARGET: 2; readonly BUBBLING_PHASE: 3; }; export declare function parseDocument(text: string, contentType?: string): Promise; export declare function makeFormData(data: Record): FormData; export declare function serializeNode(root: Node): { contentType: string; data: string | URLSearchParams | FormData; }; export declare function serialize(data: T, contentType?: string): { data: T | BodyInit; contentType?: string; }; export type ProgressEventTarget = Pick; export type ProgressData = Pick; export declare const streamFromProgress: (target: T) => AsyncGenerator; export declare function emitStreamProgress(stream: import('web-streams-polyfill').ReadableStream, total: number, eventTarget: ProgressEventTarget): AsyncGenerator; export declare enum FileMethod { text = "readAsText", dataURL = "readAsDataURL", binaryString = "readAsBinaryString", arrayBuffer = "readAsArrayBuffer" } export declare function readAs(file: Blob, method: keyof typeof FileMethod, encoding?: string): { progress: AsyncGenerator; result: Promise; }; /** * @param raw - Binary data * * @return Base64 encoded data */ export declare function encodeBase64(raw: string | Blob): Promise;