classes with computed property definitions not supported
znewsham opened this issue · comments
Zack commented
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 []
}
David Bonnet commented
Hi @znewsham, thanks for raising that bug.