2015-03-11 01:39:13 +01:00
|
|
|
=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithGetterSetterInES6.ts ===
|
|
|
|
class C {
|
|
|
|
>C : C
|
|
|
|
|
|
|
|
_name: string;
|
|
|
|
>_name : string
|
|
|
|
|
|
|
|
get name(): string {
|
|
|
|
>name : string
|
|
|
|
|
|
|
|
return this._name;
|
|
|
|
>this._name : string
|
|
|
|
>this : C
|
|
|
|
>_name : string
|
|
|
|
}
|
|
|
|
static get name2(): string {
|
|
|
|
>name2 : string
|
|
|
|
|
|
|
|
return "BYE";
|
|
|
|
}
|
|
|
|
static get ["computedname"]() {
|
|
|
|
return "";
|
|
|
|
}
|
2015-03-16 23:41:51 +01:00
|
|
|
get ["computedname"]() {
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
get ["computedname"]() {
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
set ["computedname"](x: any) {
|
|
|
|
>x : any
|
|
|
|
}
|
|
|
|
set ["computedname"](y: string) {
|
|
|
|
>y : string
|
|
|
|
}
|
2015-03-11 01:39:13 +01:00
|
|
|
|
|
|
|
set foo(a: string) { }
|
|
|
|
>foo : string
|
|
|
|
>a : string
|
|
|
|
|
|
|
|
static set bar(b: number) { }
|
|
|
|
>bar : number
|
|
|
|
>b : number
|
|
|
|
|
|
|
|
static set ["computedname"](b: string) { }
|
|
|
|
>b : string
|
|
|
|
}
|