54 lines
1.2 KiB
Plaintext
54 lines
1.2 KiB
Plaintext
=== tests/cases/compiler/file2.ts ===
|
|
///<reference path='file1.ts'/>
|
|
declare var c: C;
|
|
>c : C
|
|
>C : C
|
|
|
|
interface C {
|
|
>C : C
|
|
|
|
count(countTitle?: string): void;
|
|
>count : (countTitle?: string) => void
|
|
>countTitle : string
|
|
}
|
|
interface C {
|
|
>C : C
|
|
|
|
log(message?: any, ...optionalParams: any[]): void;
|
|
>log : (message?: any, ...optionalParams: any[]) => void
|
|
>message : any
|
|
>optionalParams : any[]
|
|
}
|
|
|
|
=== tests/cases/compiler/file1.ts ===
|
|
interface Q<T> {
|
|
>Q : Q<T>
|
|
>T : T
|
|
|
|
each(action: (item: T, index: number) => void): void;
|
|
>each : (action: (item: T, index: number) => void) => void
|
|
>action : (item: T, index: number) => void
|
|
>item : T
|
|
>T : T
|
|
>index : number
|
|
}
|
|
var q1: Q<{ a: number; }>;
|
|
>q1 : Q<{ a: number; }>
|
|
>Q : Q<T>
|
|
>a : number
|
|
|
|
var x = q1.each(x => c.log(x));
|
|
>x : void
|
|
>q1.each(x => c.log(x)) : void
|
|
>q1.each : (action: (item: { a: number; }, index: number) => void) => void
|
|
>q1 : Q<{ a: number; }>
|
|
>each : (action: (item: { a: number; }, index: number) => void) => void
|
|
>x => c.log(x) : (x: { a: number; }) => void
|
|
>x : { a: number; }
|
|
>c.log(x) : void
|
|
>c.log : (message?: any, ...optionalParams: any[]) => void
|
|
>c : C
|
|
>log : (message?: any, ...optionalParams: any[]) => void
|
|
>x : { a: number; }
|
|
|