swc/crates/swc_ecma_parser/tests/tsc/accessorWithES3.ts

22 lines
207 B
TypeScript

// @target: ES3
// error to use accessors in ES3 mode
class C {
get x() {
return 1;
}
}
class D {
set x(v) {
}
}
var x = {
get a() { return 1 }
}
var y = {
set b(v) { }
}