Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error when using export keyword with decorator #575

Open
cedric-spinergie opened this issue Nov 7, 2023 · 2 comments
Open

Parsing error when using export keyword with decorator #575

cedric-spinergie opened this issue Nov 7, 2023 · 2 comments
Labels
bug Something isn't working upstream

Comments

@cedric-spinergie
Copy link

cedric-spinergie commented Nov 7, 2023

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

@dsherret
Copy link
Member

dsherret commented Nov 7, 2023

Looks like swc-project/swc#5276

@dsherret dsherret added bug Something isn't working upstream labels Nov 7, 2023
@cedric-spinergie
Copy link
Author

Looks like swc-project/swc#5276

Yes, that's exactly the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants