64 lines
1 KiB
Plaintext
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<this>
|
|
>new B(this) : B<this>
|
|
>B : typeof B
|
|
>this : this
|
|
}
|
|
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<this>
|
|
>new B(this) : B<this>
|
|
>B : typeof B
|
|
>this : this
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
|