Skip to content

Question: what the AST should be #556

Closed
@fisker

Description

@fisker

There is a test case in Prettier

https://github.com/prettier/prettier/blob/d932cf70dfa96357acae2568f7989bfa2f1e6360/tests/format/js/decorators/member-expression.js#L18-L21

[
  class {
    @decorators[0]
    method() {}
  }
]

Currently flow-parser and meriyah parse it as method with decorators[0] as decorator. While typescript and babel parse it as computed 0 property with decorators as decorator.

Which one is expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions