mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix: proper typings for unhandledrejection event (#15271)
This commit is contained in:
parent
b5eb154d74
commit
4e71a9424e
5 changed files with 25 additions and 8 deletions
7
cli/dts/lib.deno.window.d.ts
vendored
7
cli/dts/lib.deno.window.d.ts
vendored
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue