summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.shared_globals.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/lib.deno.shared_globals.d.ts')
-rw-r--r--cli/js/lib.deno.shared_globals.d.ts16
1 files changed, 12 insertions, 4 deletions
diff --git a/cli/js/lib.deno.shared_globals.d.ts b/cli/js/lib.deno.shared_globals.d.ts
index f84a056db..fd9f3691d 100644
--- a/cli/js/lib.deno.shared_globals.d.ts
+++ b/cli/js/lib.deno.shared_globals.d.ts
@@ -1256,6 +1256,16 @@ declare class CustomEvent<T = any> extends Event {
readonly detail: T;
}
+/** A controller object that allows you to abort one or more DOM requests as and
+ * when desired. */
+declare class AbortController {
+ /** Returns the AbortSignal object associated with this object. */
+ readonly signal: AbortSignal;
+ /** Invoking this method will set this object's AbortSignal's aborted flag and
+ * signal to any observers that the associated activity is to be aborted. */
+ abort(): void;
+}
+
interface AbortSignalEventMap {
abort: Event;
}
@@ -1263,10 +1273,8 @@ interface AbortSignalEventMap {
/** A signal object that allows you to communicate with a DOM request (such as a
* Fetch) and abort it if required via an AbortController object. */
interface AbortSignal extends EventTarget {
- /**
- * Returns true if this AbortSignal's AbortController has signaled to abort,
- * and false otherwise.
- */
+ /** Returns true if this AbortSignal's AbortController has signaled to abort,
+ * and false otherwise. */
readonly aborted: boolean;
onabort: ((this: AbortSignal, ev: Event) => any) | null;
addEventListener<K extends keyof AbortSignalEventMap>(