summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2020-12-26 18:15:30 +0100
committerGitHub <noreply@github.com>2020-12-26 18:15:30 +0100
commit9419c06ab5e9f7fb258e7a48093f17f6d2511ea6 (patch)
tree84a6f43c8bc80acca7b50629511b3d33185bf7e4
parente8587c86bf94eec35ccdae5b5aa0cffc70d59563 (diff)
chore: move ProgressEvent type to deno.web lib (#8878)
-rw-r--r--cli/dts/lib.deno.shared_globals.d.ts17
-rw-r--r--op_crates/web/lib.deno_web.d.ts17
2 files changed, 17 insertions, 17 deletions
diff --git a/cli/dts/lib.deno.shared_globals.d.ts b/cli/dts/lib.deno.shared_globals.d.ts
index 6eb9019ad..433e90113 100644
--- a/cli/dts/lib.deno.shared_globals.d.ts
+++ b/cli/dts/lib.deno.shared_globals.d.ts
@@ -643,12 +643,6 @@ interface PostMessageOptions {
transfer?: any[];
}
-interface ProgressEventInit extends EventInit {
- lengthComputable?: boolean;
- loaded?: number;
- total?: number;
-}
-
interface AbstractWorkerEventMap {
"error": ErrorEvent;
}
@@ -840,17 +834,6 @@ declare class PerformanceMeasure extends PerformanceEntry {
readonly entryType: "measure";
}
-/** Events measuring progress of an underlying process, like an HTTP request
- * (for an XMLHttpRequest, or the loading of the underlying resource of an
- * <img>, <audio>, <video>, <style> or <link>). */
-declare class ProgressEvent<T extends EventTarget = EventTarget> extends Event {
- constructor(type: string, eventInitDict?: ProgressEventInit);
- readonly lengthComputable: boolean;
- readonly loaded: number;
- readonly target: T | null;
- readonly total: number;
-}
-
declare interface CustomEventInit<T = any> extends EventInit {
detail?: T;
}
diff --git a/op_crates/web/lib.deno_web.d.ts b/op_crates/web/lib.deno_web.d.ts
index 2175a5192..33d867753 100644
--- a/op_crates/web/lib.deno_web.d.ts
+++ b/op_crates/web/lib.deno_web.d.ts
@@ -148,6 +148,23 @@ interface EventListenerOptions {
capture?: boolean;
}
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+/** Events measuring progress of an underlying process, like an HTTP request
+ * (for an XMLHttpRequest, or the loading of the underlying resource of an
+ * <img>, <audio>, <video>, <style> or <link>). */
+declare class ProgressEvent<T extends EventTarget = EventTarget> extends Event {
+ constructor(type: string, eventInitDict?: ProgressEventInit);
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly target: T | null;
+ readonly total: number;
+}
+
/** Decodes a string of data which has been encoded using base-64 encoding.
*
* console.log(atob("aGVsbG8gd29ybGQ=")); // outputs 'hello world'