Skip to content

Inconsistent AST type to ESTree for decorator auto access syntax #15188

@sosukesuzuki

Description

@sosukesuzuki

💻

  • Would you like to work on this feature?

What problem are you trying to solve?

Inconsistent AST node for decorator auto accessors between ESTree and Babel.

ESTree: AccessorProperty
Babel: ClassAccessorProperty

ref: https://github.com/estree/estree/blob/master/stage3/decorators.md#accessorproperty

Describe the solution you'd like

Implement convert ClassAccessorProperty to AccessorProperty in estree plugin of babel.

Describe alternatives you've considered

Babel drops ClassAccessorProperty in favor of AccessorProperty.

Documentation, Adoption, Migration Strategy

Decorator auto accessors syntax will be landed in TypeScript 4.9 (https://devblogs.microsoft.com/typescript/announcing-typescript-4-9-rc/#auto-accessors-in-classes). Thus, the inconsistency with typescript-estree is a concern to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions