1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
=== tests/cases/compiler/file2.ts ===
///<reference path='file1.ts'/>
declare var c: C;
>c : C
interface C {
count(countTitle?: string): void;
>count : (countTitle?: string) => void
>countTitle : string
}
interface 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> {
each(action: (item: T, index: number) => void): void;
>each : (action: (item: T, index: number) => void) => void
>action : (item: T, index: number) => void
>item : T
>index : number
}
var q1: Q<{ a: number; }>;
>q1 : Q<{ a: number; }>
>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; }
|