Repository navigation
Type command event handlers as CommandEvent - #2573
Merged
github-actions[bot] merged 2 commits intoOct 14, 2026
Merged
github-actions[bot] merged 2 commits into
github-actions[bot] merged 2 commits into
Conversation
Contributor
|
Thanks for the PR! This section of the codebase is owned by Kagami Sascha Rosylight (@saschanaz) - if they write a comment saying "LGTM" then it will be merged. |
| "event": [ | ||
| { | ||
| "name": "command", | ||
| "type": "CommandEvent" |
Contributor
There was a problem hiding this comment.
This should go to events.kdlinstead
Contributor
|
LGTM, thanks! |
Contributor
|
Merging because Kagami Sascha Rosylight (@saschanaz) is a code-owner of all the changes - thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Command-event listeners and
oncommandhandlers currently inferEvent, so accessing the documentedcommandandsourceproperties fails to type-check.WebRef already identifies the event as
CommandEvent, but the generator looks up the inherited handler underGlobalEventHandlersand falls back toEvent.Map the event in
inputfiles/patches/events.kdl, regenerate the four affected DOM baselines, and add a compiler fixture requiringCommandEventinference for element/document/window/global listeners and element/window/global handlers. The event mapping uses the shared KDL event patch.Closes #2554.
Validation: the strengthened fixture fails on the mapping-free baseline and passes with the KDL event patch.
npm testandnpx tsgopassed locally. Fork preflight passed all eight jobs for contribution commit3229bab902b6d472aa7ad058cdc6c8cb479aa96d: baseline/patch/isolated-merge generator checks, both CodeQL languages, and downstream TypeScript tests. Against TypeScript6c976dad5d65d2c67f5707f3ba4a04ae991b8481, baseline and patch each exited 0 with 166,611 tests reported and 2,143 skips, no failures, and no compiler-baseline changes.