2014-08-15 23:33:16 +02:00
|
|
|
=== 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; }>
|
2014-08-19 04:56:03 +02:00
|
|
|
>Q : Q<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>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; }
|
|
|
|
|