2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/varArgsOnConstructorTypes.ts ===
|
|
|
|
export class A {
|
|
|
|
>A : A
|
|
|
|
|
|
|
|
constructor(ctor) { }
|
|
|
|
>ctor : any
|
|
|
|
}
|
|
|
|
|
|
|
|
export class B extends A {
|
|
|
|
>B : B
|
|
|
|
>A : A
|
|
|
|
|
|
|
|
private p1: number;
|
|
|
|
>p1 : number
|
|
|
|
|
|
|
|
private p2: string;
|
|
|
|
>p2 : string
|
|
|
|
|
|
|
|
constructor(element: any, url: string) {
|
|
|
|
>element : any
|
|
|
|
>url : string
|
|
|
|
|
|
|
|
super(element);
|
|
|
|
>super(element) : void
|
2014-08-28 21:31:37 +02:00
|
|
|
>super : typeof A
|
2014-08-15 23:33:16 +02:00
|
|
|
>element : any
|
|
|
|
|
|
|
|
this.p1 = element;
|
|
|
|
>this.p1 = element : any
|
|
|
|
>this.p1 : number
|
|
|
|
>this : B
|
|
|
|
>p1 : number
|
|
|
|
>element : any
|
|
|
|
|
|
|
|
this.p2 = url;
|
|
|
|
>this.p2 = url : string
|
|
|
|
>this.p2 : string
|
|
|
|
>this : B
|
|
|
|
>p2 : string
|
|
|
|
>url : string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface I1 {
|
|
|
|
>I1 : I1
|
|
|
|
|
|
|
|
register(inputClass: new(...params: any[]) => A);
|
2014-10-18 01:53:18 +02:00
|
|
|
>register : { (inputClass: new (...params: any[]) => A): any; (inputClass: (new (...params: any[]) => A)[]): any; }
|
2014-08-15 23:33:16 +02:00
|
|
|
>inputClass : new (...params: any[]) => A
|
|
|
|
>params : any[]
|
|
|
|
>A : A
|
|
|
|
|
|
|
|
register(inputClass: { new (...params: any[]): A; }[]);
|
2014-10-18 01:53:18 +02:00
|
|
|
>register : { (inputClass: new (...params: any[]) => A): any; (inputClass: (new (...params: any[]) => A)[]): any; }
|
|
|
|
>inputClass : (new (...params: any[]) => A)[]
|
2014-08-15 23:33:16 +02:00
|
|
|
>params : any[]
|
|
|
|
>A : A
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var reg: I1;
|
|
|
|
>reg : I1
|
|
|
|
>I1 : I1
|
|
|
|
|
|
|
|
reg.register(B);
|
|
|
|
>reg.register(B) : any
|
2014-10-18 01:53:18 +02:00
|
|
|
>reg.register : { (inputClass: new (...params: any[]) => A): any; (inputClass: (new (...params: any[]) => A)[]): any; }
|
2014-08-15 23:33:16 +02:00
|
|
|
>reg : I1
|
2014-10-18 01:53:18 +02:00
|
|
|
>register : { (inputClass: new (...params: any[]) => A): any; (inputClass: (new (...params: any[]) => A)[]): any; }
|
2014-08-15 23:33:16 +02:00
|
|
|
>B : typeof B
|
|
|
|
|