TypeScript/tests/baselines/reference/computedPropertyNamesWithStaticProperty.types

32 lines
585 B
Plaintext
Raw Normal View History

2015-03-16 23:20:40 +01:00
=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts ===
class C {
>C : C
2015-03-16 23:20:40 +01:00
static staticProp = 10;
>staticProp : number
2015-04-13 21:36:11 +02:00
>10 : number
2015-03-16 23:20:40 +01:00
get [C.staticProp]() {
>C.staticProp : number
>C : typeof C
>staticProp : number
2015-03-16 23:20:40 +01:00
return "hello";
2015-04-13 21:36:11 +02:00
>"hello" : string
2015-03-16 23:20:40 +01:00
}
set [C.staticProp](x: string) {
>C.staticProp : number
>C : typeof C
>staticProp : number
>x : string
2015-03-16 23:20:40 +01:00
var y = x;
>y : string
>x : string
2015-03-16 23:20:40 +01:00
}
[C.staticProp]() { }
>C.staticProp : number
>C : typeof C
>staticProp : number
2015-03-16 23:20:40 +01:00
}