54 lines
836 B
Text
54 lines
836 B
Text
=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithThisKeywordInES6.ts ===
|
|
class B {
|
|
>B : B
|
|
|
|
x = 10;
|
|
>x : number
|
|
>10 : number
|
|
|
|
constructor() {
|
|
this.x = 10;
|
|
>this.x = 10 : number
|
|
>this.x : number
|
|
>this : B
|
|
>x : number
|
|
>10 : number
|
|
}
|
|
static log(a: number) { }
|
|
>log : (a: number) => void
|
|
>a : number
|
|
|
|
foo() {
|
|
>foo : () => void
|
|
|
|
B.log(this.x);
|
|
>B.log(this.x) : void
|
|
>B.log : (a: number) => void
|
|
>B : typeof B
|
|
>log : (a: number) => void
|
|
>this.x : number
|
|
>this : B
|
|
>x : number
|
|
}
|
|
|
|
get X() {
|
|
>X : number
|
|
|
|
return this.x;
|
|
>this.x : number
|
|
>this : B
|
|
>x : number
|
|
}
|
|
|
|
set bX(y: number) {
|
|
>bX : number
|
|
>y : number
|
|
|
|
this.x = y;
|
|
>this.x = y : number
|
|
>this.x : number
|
|
>this : B
|
|
>x : number
|
|
>y : number
|
|
}
|
|
}
|