@wevu/web-apis
Version:
Web API polyfills and global installers for mini-program runtimes
30 lines • 1.17 kB
text/typescript
//#region src/web.d.ts
type BlobPart = ArrayBuffer | ArrayBufferView | BlobPolyfill | string;
declare class BlobPolyfill {
readonly size: number;
readonly type: string;
private readonly parts;
constructor(parts?: BlobPart[], options?: {
type?: string;
});
arrayBuffer(): Promise<ArrayBuffer>;
text(): Promise<string>;
}
type FormDataEntryValue = BlobPolyfill | string;
declare class FormDataPolyfill {
private readonly entriesList;
append(name: string, value: FormDataEntryValue): void;
delete(name: string): void;
get(name: string): FormDataEntryValue | null;
getAll(name: string): FormDataEntryValue[];
has(name: string): boolean;
set(name: string, value: FormDataEntryValue): void;
forEach(callback: (value: FormDataEntryValue, key: string, parent: FormDataPolyfill) => void): void;
entries(): Generator<[string, FormDataEntryValue], void, unknown>;
keys(): Generator<string, void, unknown>;
values(): Generator<FormDataEntryValue, void, unknown>;
[Symbol.iterator](): Generator<[string, FormDataEntryValue], void, unknown>;
get [Symbol.toStringTag](): string;
}
//#endregion
export { BlobPolyfill, FormDataPolyfill };