mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
fix: declare web types as global (#12497)
Co-authored-by: Feng Yu <F3n67u@outlook.com>
This commit is contained in:
parent
8a0e206ede
commit
2997021615
3 changed files with 58 additions and 19 deletions
11
ext/fetch/lib.deno_fetch.d.ts
vendored
11
ext/fetch/lib.deno_fetch.d.ts
vendored
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue