File: crashInResolveInterface.js

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (25 lines) | stat: -rw-r--r-- 544 bytes parent folder | download | duplicates (7)
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
//// [tests/cases/compiler/crashInResolveInterface.ts] ////

//// [file1.ts]
interface Q<T> {
    each(action: (item: T, index: number) => void): void;
}
var q1: Q<{ a: number; }>;
var x = q1.each(x => c.log(x));

//// [file2.ts]
///<reference path='file1.ts'/>
declare var c: C;
interface C {
    count(countTitle?: string): void;
}
interface C {
    log(message?: any, ...optionalParams: any[]): void;
}


//// [file1.js]
var q1;
var x = q1.each(function (x) { return c.log(x); });
//// [file2.js]
///<reference path='file1.ts'/>