diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-12 23:10:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-12 22:10:42 +0000 |
commit | 7471587d29096a8de95a530f2132214ab9c08afa (patch) | |
tree | d9de4d8e894f7c744c75029898bc1fdd850a758a /cli/tsc/dts | |
parent | 288774c5eda35c27db21526bbcc94488c534137c (diff) |
feat: "rejectionhandled" Web event and "rejectionHandled" Node event (#21875)
This commit adds support for "rejectionhandled" Web Event and
"rejectionHandled" Node event.
```js
import process from "node:process";
process.on("rejectionHandled", (promise) => {
console.log("rejectionHandled", reason, promise);
});
window.addEventListener("rejectionhandled", (event) => {
console.log("rejectionhandled", event.reason, event.promise);
});
```
---------
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
Diffstat (limited to 'cli/tsc/dts')
-rw-r--r-- | cli/tsc/dts/lib.deno.window.d.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/tsc/dts/lib.deno.window.d.ts b/cli/tsc/dts/lib.deno.window.d.ts index c518c5356..eaab7c3c2 100644 --- a/cli/tsc/dts/lib.deno.window.d.ts +++ b/cli/tsc/dts/lib.deno.window.d.ts @@ -12,6 +12,7 @@ declare interface WindowEventMap { "error": ErrorEvent; "unhandledrejection": PromiseRejectionEvent; + "rejectionhandled": PromiseRejectionEvent; } /** @category Web APIs */ @@ -25,6 +26,9 @@ declare interface Window extends EventTarget { onunhandledrejection: | ((this: Window, ev: PromiseRejectionEvent) => any) | null; + onrejectionhandled: + | ((this: Window, ev: PromiseRejectionEvent) => any) + | null; close: () => void; readonly closed: boolean; alert: (message?: string) => void; |