Skip to content

refactor(ast): rename #[estree(type)] attr on struct fields to #[estree(ts_type)]#8767

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-28-refactor_ast_rename_estree_type_attr_on_struct_fields_to_estree_ts_type_
Jan 28, 2025
Merged

refactor(ast): rename #[estree(type)] attr on struct fields to #[estree(ts_type)]#8767
graphite-app[bot] merged 1 commit intomainfrom
01-28-refactor_ast_rename_estree_type_attr_on_struct_fields_to_estree_ts_type_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jan 28, 2025

To override the TS type of a struct field in ESTree AST, use #[estree(ts_type = "Identifier")] instead of #[estree(type = "Identifier")].

This is clearer, and avoids using the keyword type, which makes the attributes simpler to parse.

Copy link
Member Author

overlookmotel commented Jan 28, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added A-ast Area - AST A-ast-tools Area - AST tools C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 28, 2025
@overlookmotel overlookmotel marked this pull request as ready for review January 28, 2025 11:54
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 28, 2025

CodSpeed Performance Report

Merging #8767 will not alter performance

Comparing 01-28-refactor_ast_rename_estree_type_attr_on_struct_fields_to_estree_ts_type_ (8cf9d34) with main (a316b10)

Summary

✅ 33 untouched benchmarks

@overlookmotel
Copy link
Member Author

overlookmotel commented Jan 28, 2025

I'm revamping oxc_ast_tools considerably at the moment, and this is just a small preparatory step for that, so merging without review.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Jan 28, 2025
Copy link
Member Author

overlookmotel commented Jan 28, 2025

Merge activity

  • Jan 28, 7:01 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 28, 7:01 AM EST: A user added this pull request to the Graphite merge queue.
  • Jan 28, 7:17 AM EST: A user merged this pull request with the Graphite merge queue.

@overlookmotel overlookmotel changed the base branch from 01-28-refactor_ast_rename_estree_type_attr_on_types_to_estree_rename_ to graphite-base/8767 January 28, 2025 12:02
@graphite-app graphite-app bot changed the base branch from graphite-base/8767 to main January 28, 2025 12:08
…stree(ts_type)]` (#8767)

To override the TS type of a struct field in ESTree AST, use `#[estree(ts_type = "Identifier")]` instead of `#[estree(type = "Identifier")]`.

This is clearer, and avoids using the keyword `type`, which makes the attributes simpler to parse.
@overlookmotel overlookmotel force-pushed the 01-28-refactor_ast_rename_estree_type_attr_on_struct_fields_to_estree_ts_type_ branch from d4fc28b to 8cf9d34 Compare January 28, 2025 12:09
@graphite-app graphite-app bot merged commit 8cf9d34 into main Jan 28, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 01-28-refactor_ast_rename_estree_type_attr_on_struct_fields_to_estree_ts_type_ branch January 28, 2025 12:17
@oxc-bot oxc-bot mentioned this pull request Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-ast Area - AST A-ast-tools Area - AST tools C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant