Skip to content

Parsing error when using export keyword with decorator #575

@cedric-spinergie

Description

@cedric-spinergie

Describe the bug
The valid TypeScript code below causes a parsing error.

dprint-plugin-typescript version: 0.88.3

Input Code

export class MyClass {
  @MyDecorator() export = "myStr";
}

Expected Output

export class MyClass {
  @MyDecorator() export = "myStr";
}

Actual Output

`export` is not allowed here at file.ts:2:18

    @MyDecorator() export = "myStr";
                   ~~~~~~

Playground Link
Playground link

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions