Skip to content

Commit 92f4c64

Browse files
tuureszhengbli
authored andcommitted
add PromiseRejectionEvent from WHATWG Living Standard (#187)
1 parent 62c5f36 commit 92f4c64

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

baselines/dom.generated.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14138,6 +14138,16 @@ interface CustomElementRegistry {
1413814138
whenDefined(name: string): PromiseLike<void>;
1413914139
}
1414014140

14141+
interface PromiseRejectionEvent extends Event {
14142+
readonly promise: PromiseLike<any>;
14143+
readonly reason: any;
14144+
}
14145+
14146+
interface PromiseRejectionEventInit extends EventInit {
14147+
promise: PromiseLike<any>;
14148+
reason?: any;
14149+
}
14150+
1414114151
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
1414214152

1414314153
interface ErrorEventHandler {

inputfiles/addedTypes.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,5 +1409,33 @@
14091409
"interface": "Window",
14101410
"name": "customElements",
14111411
"type": "CustomElementRegistry"
1412+
},
1413+
{
1414+
"kind": "interface",
1415+
"name": "PromiseRejectionEvent",
1416+
"extends": "Event",
1417+
"flavor": "Web",
1418+
"properties": [{
1419+
"name": "promise",
1420+
"type": "PromiseLike<any>",
1421+
"readonly": true
1422+
}, {
1423+
"name": "reason",
1424+
"type": "any",
1425+
"readonly": true
1426+
}]
1427+
},
1428+
{
1429+
"kind": "interface",
1430+
"name": "PromiseRejectionEventInit",
1431+
"extends": "EventInit",
1432+
"flavor": "Web",
1433+
"properties": [{
1434+
"name": "promise",
1435+
"type": "PromiseLike<any>"
1436+
}, {
1437+
"name": "reason?",
1438+
"type": "any"
1439+
}]
14121440
}
14131441
]

0 commit comments

Comments
 (0)