TypeScript/tests/baselines/reference/genericClassesInModule2.types
2014-08-18 19:56:03 -07:00

64 lines
1 KiB
Plaintext

=== tests/cases/compiler/genericClassesInModule2.ts ===
export class A<T1>{
>A : A<T1>
>T1 : T1
constructor( public callback: (self: A<T1>) => void) {
>callback : (self: A<T1>) => void
>self : A<T1>
>A : A<T1>
>T1 : T1
var child = new B(this);
>child : B<A<T1>>
>new B(this) : B<A<T1>>
>B : typeof B
>this : A<T1>
}
AAA( callback: (self: A<T1>) => void) {
>AAA : (callback: (self: A<T1>) => void) => void
>callback : (self: A<T1>) => void
>self : A<T1>
>A : A<T1>
>T1 : T1
var child = new B(this);
>child : B<A<T1>>
>new B(this) : B<A<T1>>
>B : typeof B
>this : A<T1>
}
}
export interface C<T1>{
>C : C<T1>
>T1 : T1
child: B<T1>;
>child : B<T1>
>B : B<T2>
>T1 : T1
(self: C<T1>): void;
>self : C<T1>
>C : C<T1>
>T1 : T1
new(callback: (self: C<T1>) => void)
>callback : (self: C<T1>) => void
>self : C<T1>
>C : C<T1>
>T1 : T1
}
export class B<T2> {
>B : B<T2>
>T2 : T2
constructor(public parent: T2) { }
>parent : T2
>T2 : T2
}