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

classes with computed property definitions not supported #669

Closed
znewsham opened this issue Dec 12, 2022 · 1 comment · Fixed by #672
Closed

classes with computed property definitions not supported #669

znewsham opened this issue Dec 12, 2022 · 1 comment · Fixed by #672
Labels

Comments

@znewsham
Copy link
Contributor

Motivation

I want to be able to convert to strings ASTs including computed property definitions (specifically symbols)

Expected behavior

const s = Symbol('123')
class X {
static [s] = 1;
}

generate(acorn.parse(code)) should result in the same output as input, instead the output is:

Actual behavior

const s = Symbol('123')
class X {
static s = 1; // note the lack of []
}
@davidbonnet
Copy link
Owner

Hi @znewsham, thanks for raising that bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants