diff options
Diffstat (limited to 'ext/fetch/lib.deno_fetch.d.ts')
-rw-r--r-- | ext/fetch/lib.deno_fetch.d.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ext/fetch/lib.deno_fetch.d.ts b/ext/fetch/lib.deno_fetch.d.ts index 7fe7d9453..e2f693d28 100644 --- a/ext/fetch/lib.deno_fetch.d.ts +++ b/ext/fetch/lib.deno_fetch.d.ts @@ -22,11 +22,7 @@ type FormDataEntryValue = File | string; * form fields and their values, which can then be easily sent using the * XMLHttpRequest.send() method. It uses the same format a form would use if the * encoding type were set to "multipart/form-data". */ -declare class FormData implements DomIterable<string, FormDataEntryValue> { - // TODO(ry) FormData constructor is non-standard. - // new(form?: HTMLFormElement): FormData; - constructor(); - +interface FormData { append(name: string, value: string | Blob, fileName?: string): void; delete(name: string): void; get(name: string): FormDataEntryValue | null; @@ -43,6 +39,11 @@ declare class FormData implements DomIterable<string, FormDataEntryValue> { ): void; } +declare var FormData: { + prototype: FormData; + new (): FormData; +}; + interface Body { /** A simple getter used to expose a `ReadableStream` of the body contents. */ readonly body: ReadableStream<Uint8Array> | null; |