62 lines
944 B
Text
62 lines
944 B
Text
=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts ===
|
|
class A {
|
|
>A : A
|
|
|
|
y: number;
|
|
>y : number
|
|
|
|
constructor(x: number) {
|
|
>x : number
|
|
}
|
|
foo(a: any);
|
|
>foo : (a: any) => any
|
|
>a : any
|
|
|
|
foo() { }
|
|
>foo : (a: any) => any
|
|
}
|
|
|
|
class B {
|
|
>B : B
|
|
|
|
y: number;
|
|
>y : number
|
|
|
|
x: string = "hello";
|
|
>x : string
|
|
>"hello" : string
|
|
|
|
_bar: string;
|
|
>_bar : string
|
|
|
|
constructor(x: number, z = "hello", ...args) {
|
|
>x : number
|
|
>z : string
|
|
>"hello" : string
|
|
>args : any[]
|
|
|
|
this.y = 10;
|
|
>this.y = 10 : number
|
|
>this.y : number
|
|
>this : B
|
|
>y : number
|
|
>10 : number
|
|
}
|
|
baz(...args): string;
|
|
>baz : (...args: any[]) => string
|
|
>args : any[]
|
|
|
|
baz(z: string, v: number): string {
|
|
>baz : (...args: any[]) => string
|
|
>z : string
|
|
>v : number
|
|
|
|
return this._bar;
|
|
>this._bar : string
|
|
>this : B
|
|
>_bar : string
|
|
}
|
|
}
|
|
|
|
|
|
|