提交 b2cd71dd 编写于 作者: Z ztplz 提交者: Ryan Dahl

add type declaration

上级 ceaf8226
......@@ -30,6 +30,7 @@ type ReferrerPolicy =
| "origin-when-cross-origin"
| "unsafe-url";
type BlobPart = BufferSource | Blob | string;
type FormDataEntryValue = File | string;
declare type EventListenerOrEventListenerObject =
| EventListener
| EventListenerObject;
......@@ -42,10 +43,6 @@ interface HTMLFormElement {
// TODO
}
interface FormDataEntryValue {
// TODO
}
interface BlobPropertyBag {
type?: string;
}
......@@ -141,6 +138,20 @@ interface Event {
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 {
readonly lengthComputable: boolean;
readonly loaded: number;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册