1 | export interface FormDataEntry {
|
2 | key: string;
|
3 | value: string | Blob | Buffer;
|
4 | fileName?: string;
|
5 | }
|
6 | export class FormData {
|
7 | private _entries: FormDataEntry[] = [];
|
8 | append(key: string, value: string | Blob | Buffer, fileName?: string): void {
|
9 | this._entries.push({key, value, fileName});
|
10 | }
|
11 | }
|
12 |
|
13 | export function getFormDataEntries(fd: FormData): FormDataEntry[] {
|
14 | return (fd as any)._entries;
|
15 | }
|