25 lines
469 B
TypeScript
25 lines
469 B
TypeScript
|
//// [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;
|