TypeScript/tests/cases/conformance/salsa/lateBoundClassMemberAssignmentJS.ts

18 lines
374 B
TypeScript
Raw Normal View History

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