-
Notifications
You must be signed in to change notification settings - Fork 452
Open
Description
CustomEvent.detail is defined as follows:
interface CustomEvent<T = any> extends Event {
readonly detail: T;
// ...
}
Source:
TypeScript-DOM-lib-generator/inputfiles/overridingTypes.jsonc
Lines 538 to 540 in 957eced
"detail": { | |
"overrideType": "T" | |
} |
This is slightly wrong as CustomEvent.detail defaults to null
when not defined: Playground
The playground contains a fix I suggest: detail: T extends {} ? T : null
I'll open a PR referring to this issue
Metadata
Metadata
Assignees
Labels
No labels