mirror of
https://github.com/denoland/deno.git
synced 2025-02-02 04:38:21 -05:00
add type declaration
This commit is contained in:
parent
ceaf822682
commit
b2cd71ddce
1 changed files with 15 additions and 4 deletions
19
js/fetch_types.d.ts
vendored
19
js/fetch_types.d.ts
vendored
|
@ -30,6 +30,7 @@ type ReferrerPolicy =
|
||||||
| "origin-when-cross-origin"
|
| "origin-when-cross-origin"
|
||||||
| "unsafe-url";
|
| "unsafe-url";
|
||||||
type BlobPart = BufferSource | Blob | string;
|
type BlobPart = BufferSource | Blob | string;
|
||||||
|
type FormDataEntryValue = File | string;
|
||||||
declare type EventListenerOrEventListenerObject =
|
declare type EventListenerOrEventListenerObject =
|
||||||
| EventListener
|
| EventListener
|
||||||
| EventListenerObject;
|
| EventListenerObject;
|
||||||
|
@ -42,10 +43,6 @@ interface HTMLFormElement {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FormDataEntryValue {
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
interface BlobPropertyBag {
|
interface BlobPropertyBag {
|
||||||
type?: string;
|
type?: string;
|
||||||
}
|
}
|
||||||
|
@ -141,6 +138,20 @@ interface Event {
|
||||||
readonly NONE: number;
|
readonly NONE: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface File extends Blob {
|
||||||
|
readonly lastModified: number;
|
||||||
|
readonly name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare var File: {
|
||||||
|
prototype: File;
|
||||||
|
new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
|
||||||
|
};
|
||||||
|
|
||||||
|
interface FilePropertyBag extends BlobPropertyBag {
|
||||||
|
lastModified?: number;
|
||||||
|
}
|
||||||
|
|
||||||
interface ProgressEvent extends Event {
|
interface ProgressEvent extends Event {
|
||||||
readonly lengthComputable: boolean;
|
readonly lengthComputable: boolean;
|
||||||
readonly loaded: number;
|
readonly loaded: number;
|
||||||
|
|
Loading…
Add table
Reference in a new issue