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

18 lines
357 B
TypeScript

// @allowJs: true
// @checkJs: true
// @emitDeclarationOnly: true
// @strict: true
// @target: es6
// @declaration: true
// @filename: lateBoundClassMemberAssignmentJS2.js
const _sym = "my-fake-sym";
export class MyClass {
constructor() {
this[_sym] = "ok";
}
method() {
this[_sym] = "yep";
const x = this[_sym];
}
}