fix(ast): serialize Function.params like estree#8772
fix(ast): serialize Function.params like estree#8772overlookmotel merged 2 commits intooxc-project:mainfrom
Function.params like estree#8772Conversation
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. |
CodSpeed Performance ReportMerging #8772 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Looks good!
However, I'd like to wait for #8897 to land before merging this, as that PR changes how you define custom TS types - it removes the custom_types.d.ts file in favour of defining TS type defs in attributes on the Rust type definitions.
I'd prefer not to restack that whole lot of PRs on top of this as CI on large stacks takes quite a long time, but I'll fix this one once #8897 lands, and will get it merged then.
6d12de9 to
9f2240e
Compare
This PR attempts to handle estree ast incompatibility of
Function.params: FormalParametersas mentioned in the above issue:Estree spec has
Function.params: Pattern[]https://github.com/estree/estree/blob/master/es5.md#functions, but oxc already hasinterface Pattern, so I named it toFunction.params: ParamPattern[]for now.Also I'm not sure about the testing (I suppose that's a part of #8630), so I snapshoted one example code. For comparison, here is acorn's output https://astexplorer.net/#/gist/25138c0605f82dcfc1a8fd363dc2a681/5ad30d36c9f276519063e6fd2e340c113d8c85b0