TypeScript/tests/baselines/reference/crashInResolveInterface.types

54 lines
1.2 KiB
Plaintext
Raw Normal View History

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
2014-08-15 23:33:16 +02:00
interface C {
>C : C
2014-08-15 23:33:16 +02:00
count(countTitle?: string): void;
>count : (countTitle?: string) => void
>countTitle : string
2014-08-15 23:33:16 +02:00
}
interface C {
>C : C
2014-08-15 23:33:16 +02:00
log(message?: any, ...optionalParams: any[]): void;
>log : (message?: any, ...optionalParams: any[]) => void
>message : any
>optionalParams : any[]
2014-08-15 23:33:16 +02:00
}
=== tests/cases/compiler/file1.ts ===
interface Q<T> {
>Q : Q<T>
>T : T
2014-08-15 23:33:16 +02:00
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
2014-08-15 23:33:16 +02:00
}
var q1: Q<{ a: number; }>;
>q1 : Q<{ a: number; }>
>Q : Q<T>
>a : number
2014-08-15 23:33:16 +02:00
var x = q1.each(x => c.log(x));
>x : void
2014-08-15 23:33:16 +02:00
>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
2014-08-15 23:33:16 +02:00
>x => c.log(x) : (x: { a: number; }) => void
>x : { a: number; }
2014-08-15 23:33:16 +02:00
>c.log(x) : void
>c.log : (message?: any, ...optionalParams: any[]) => void
>c : C
>log : (message?: any, ...optionalParams: any[]) => void
>x : { a: number; }
2014-08-15 23:33:16 +02:00