fix(ast/estree): correct raw transfer deserializer for FormalParameter#15302
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. |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes incorrect type annotations in the deserialization code for FormalParameter when creating a TSParameterProperty. The change corrects references to span positions that were incorrectly annotated with <BindingRestElement> when they should directly reference the FormalParameter's span.
- Removed incorrect
<BindingRestElement>type annotations fromPOS_OFFSETreferences in theTSParameterPropertydeserialization path
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CodSpeed Performance ReportMerging #15302 will not alter performanceComparing Summary
Footnotes |
Merge activity
|
…er` (#15302) Correct the custom deserializer for `FormalParameter`. Was using the span offsets from `BindingRestElement`, when should be `FormalParameter`. `span` is the 1st field in both structs, so this fix makes no difference to the generated deserializer code, but it makes sure it'll remain correct if `span` field in either struct moves position later on.
080a69a to
d92451e
Compare

Correct the custom deserializer for
FormalParameter. Was using the span offsets fromBindingRestElement, when should beFormalParameter.spanis the 1st field in both structs, so this fix makes no difference to the generated deserializer code, but it makes sure it'll remain correct ifspanfield in either struct moves position later on.