62 lines
1 KiB
Plaintext
62 lines
1 KiB
Plaintext
=== 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";
|
|
>"BYE" : string
|
|
}
|
|
static get ["computedname"]() {
|
|
>"computedname" : string
|
|
|
|
return "";
|
|
>"" : string
|
|
}
|
|
get ["computedname"]() {
|
|
>"computedname" : string
|
|
|
|
return "";
|
|
>"" : string
|
|
}
|
|
get ["computedname"]() {
|
|
>"computedname" : string
|
|
|
|
return "";
|
|
>"" : string
|
|
}
|
|
|
|
set ["computedname"](x: any) {
|
|
>"computedname" : string
|
|
>x : any
|
|
}
|
|
set ["computedname"](y: string) {
|
|
>"computedname" : string
|
|
>y : string
|
|
}
|
|
|
|
set foo(a: string) { }
|
|
>foo : string
|
|
>a : string
|
|
|
|
static set bar(b: number) { }
|
|
>bar : number
|
|
>b : number
|
|
|
|
static set ["computedname"](b: string) { }
|
|
>"computedname" : string
|
|
>b : string
|
|
}
|