summaryrefslogtreecommitdiff
path: root/js/fetch_types.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/fetch_types.d.ts')
-rw-r--r--js/fetch_types.d.ts19
1 files changed, 15 insertions, 4 deletions
diff --git a/js/fetch_types.d.ts b/js/fetch_types.d.ts
index 644cb76ee..ebe2c70be 100644
--- a/js/fetch_types.d.ts
+++ b/js/fetch_types.d.ts
@@ -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;