1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] ////
//// [computedPropertyNamesWithStaticProperty.ts]
class C {
static staticProp = 10;
get [C.staticProp]() {
return "hello";
}
set [C.staticProp](x: string) {
var y = x;
}
[C.staticProp]() { }
}
//// [computedPropertyNamesWithStaticProperty.js]
class C {
get [C.staticProp]() {
return "hello";
}
set [C.staticProp](x) {
var y = x;
}
[C.staticProp]() { }
}
C.staticProp = 10;
|