diff options
Diffstat (limited to 'cli/dts')
-rw-r--r-- | cli/dts/lib.deno.window.d.ts | 7 | ||||
-rw-r--r-- | cli/dts/lib.deno.worker.d.ts | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.window.d.ts b/cli/dts/lib.deno.window.d.ts index 1600b0eac..1dbfb0493 100644 --- a/cli/dts/lib.deno.window.d.ts +++ b/cli/dts/lib.deno.window.d.ts @@ -9,6 +9,7 @@ interface WindowEventMap { "error": ErrorEvent; + "unhandledrejection": PromiseRejectionEvent; } declare class Window extends EventTarget { @@ -18,6 +19,9 @@ declare class Window extends EventTarget { onerror: ((this: Window, ev: ErrorEvent) => any) | null; onload: ((this: Window, ev: Event) => any) | null; onunload: ((this: Window, ev: Event) => any) | null; + onunhandledrejection: + | ((this: Window, ev: PromiseRejectionEvent) => any) + | null; close: () => void; readonly closed: boolean; alert: (message?: string) => void; @@ -64,6 +68,9 @@ declare var self: Window & typeof globalThis; declare var onerror: ((this: Window, ev: ErrorEvent) => any) | null; declare var onload: ((this: Window, ev: Event) => any) | null; declare var onunload: ((this: Window, ev: Event) => any) | null; +declare var onunhandledrejection: + | ((this: Window, ev: PromiseRejectionEvent) => any) + | null; declare var localStorage: Storage; declare var sessionStorage: Storage; diff --git a/cli/dts/lib.deno.worker.d.ts b/cli/dts/lib.deno.worker.d.ts index f613f2800..7be9211a4 100644 --- a/cli/dts/lib.deno.worker.d.ts +++ b/cli/dts/lib.deno.worker.d.ts @@ -8,12 +8,16 @@ interface WorkerGlobalScopeEventMap { "error": ErrorEvent; + "unhandledrejection": PromiseRejectionEvent; } declare class WorkerGlobalScope extends EventTarget { readonly location: WorkerLocation; readonly navigator: WorkerNavigator; onerror: ((this: WorkerGlobalScope, ev: ErrorEvent) => any) | null; + onunhandledrejection: + | ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) + | null; readonly self: WorkerGlobalScope & typeof globalThis; @@ -117,6 +121,9 @@ declare var navigator: WorkerNavigator; declare var onerror: | ((this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any) | null; +declare var onunhandledrejection: + | ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) + | null; declare var self: WorkerGlobalScope & typeof globalThis; declare function addEventListener< K extends keyof DedicatedWorkerGlobalScopeEventMap, |