53 lines
780 B
Plaintext
53 lines
780 B
Plaintext
|
=== tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts ===
|
||
|
var s: string;
|
||
|
>s : string
|
||
|
|
||
|
var n: number;
|
||
|
>n : number
|
||
|
|
||
|
var a: any;
|
||
|
>a : any
|
||
|
|
||
|
class C {
|
||
|
>C : C
|
||
|
|
||
|
get [s]() { return 0;}
|
||
|
>s : string
|
||
|
|
||
|
set [n](v) { }
|
||
|
>n : number
|
||
|
>v : any
|
||
|
|
||
|
static get [s + s]() { return 0; }
|
||
|
>s + s : string
|
||
|
>s : string
|
||
|
>s : string
|
||
|
|
||
|
set [s + n](v) { }
|
||
|
>s + n : string
|
||
|
>s : string
|
||
|
>n : number
|
||
|
>v : any
|
||
|
|
||
|
get [+s]() { return 0; }
|
||
|
>+s : number
|
||
|
>s : string
|
||
|
|
||
|
static set [""](v) { }
|
||
|
>v : any
|
||
|
|
||
|
get [0]() { return 0; }
|
||
|
set [a](v) { }
|
||
|
>a : any
|
||
|
>v : any
|
||
|
|
||
|
static get [<any>true]() { return 0; }
|
||
|
><any>true : any
|
||
|
|
||
|
set [`hello bye`](v) { }
|
||
|
>v : any
|
||
|
|
||
|
get [`hello ${a} bye`]() { return 0; }
|
||
|
>a : any
|
||
|
}
|