docs(ast): fix docs for AssignmentPattern in BindingPattern enum#17309
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merge activity
|
CodSpeed Performance ReportMerging #17309 will not alter performanceComparing Summary
Footnotes
|
63b29b2 to
8986b7c
Compare
There was a problem hiding this comment.
Pull request overview
This PR fixes the documentation for the AssignmentPattern variant in the BindingPattern enum, as a follow-up to PR #15925 which refactored binding patterns. The documentation now correctly reflects that AssignmentPattern is not used in function parameters, as FormalParameter has its own initializer field for default values.
Key changes:
- Removed incorrect examples showing
AssignmentPatternin function parameter contexts (e.g.,function f(x = 1) {}) - Enhanced the "Invalid in" section with proper documentation links and clearer explanations
- Added explicit references to
FormalParameter::initializerand clarified syntax error cases
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8986b7c to
1005c0a
Compare

follow on from #15925