TypeScript/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.types

63 lines
944 B
Plaintext
Raw Normal View History

=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts ===
2015-03-16 05:40:15 +01:00
class A {
>A : A
y: number;
>y : number
constructor(x: number) {
>x : number
}
2015-03-16 05:40:15 +01:00
foo(a: any);
>foo : (a: any) => any
>a : any
2015-03-16 05:40:15 +01:00
foo() { }
>foo : (a: any) => any
}
2015-03-16 05:40:15 +01:00
class B {
>B : B
y: number;
>y : number
x: string = "hello";
>x : string
2015-04-13 21:36:11 +02:00
>"hello" : string
2015-03-16 05:40:15 +01:00
_bar: string;
>_bar : string
2015-03-16 05:40:15 +01:00
constructor(x: number, z = "hello", ...args) {
>x : number
>z : string
2015-04-13 21:36:11 +02:00
>"hello" : string
>args : any[]
this.y = 10;
>this.y = 10 : number
>this.y : number
>this : B
>y : number
2015-04-13 21:36:11 +02:00
>10 : number
}
2015-03-16 05:40:15 +01:00
baz(...args): string;
>baz : (...args: any[]) => string
>args : any[]
2015-03-16 05:40:15 +01:00
baz(z: string, v: number): string {
>baz : (...args: any[]) => string
>z : string
>v : number
2015-03-16 05:40:15 +01:00
return this._bar;
>this._bar : string
>this : B
>_bar : string
2015-03-16 05:40:15 +01:00
}
}
2015-03-16 05:40:15 +01:00