1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 04:48:52 -05:00

chore: move ProgressEvent type to deno.web lib (#8878)

This commit is contained in:
Luca Casonato 2020-12-26 18:15:30 +01:00 committed by GitHub
parent e8587c86bf
commit 9419c06ab5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 17 deletions

View file

@ -643,12 +643,6 @@ interface PostMessageOptions {
transfer?: any[]; transfer?: any[];
} }
interface ProgressEventInit extends EventInit {
lengthComputable?: boolean;
loaded?: number;
total?: number;
}
interface AbstractWorkerEventMap { interface AbstractWorkerEventMap {
"error": ErrorEvent; "error": ErrorEvent;
} }
@ -840,17 +834,6 @@ declare class PerformanceMeasure extends PerformanceEntry {
readonly entryType: "measure"; 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 { declare interface CustomEventInit<T = any> extends EventInit {
detail?: T; detail?: T;
} }

View file

@ -148,6 +148,23 @@ interface EventListenerOptions {
capture?: boolean; 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. /** Decodes a string of data which has been encoded using base-64 encoding.
* *
* console.log(atob("aGVsbG8gd29ybGQ=")); // outputs 'hello world' * console.log(atob("aGVsbG8gd29ybGQ=")); // outputs 'hello world'