File: exportEqualTypes.ts

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 759 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/// <reference path='./fourslash.ts'/>

// @Filename: exportEqualTypes_file0.ts
////interface x {
////    (): Date;
////    foo: string;
////}
////export = x;

// @Filename: exportEqualTypes_file1.ts
///////<reference path='exportEqualTypes_file0.ts'/>
////import test = require('./exportEqualTypes_file0');
////var t: /*1*/test;  // var 't' should be of type 'test'
////var /*2*/r1 = t(); // Should return a Date
////var /*3*/r2 = t./*4*/foo; // t should have 'foo' in dropdown list and be of type 'string'

verify.quickInfos({
    1: "import test = require('./exportEqualTypes_file0')",
    2: "var r1: Date",
    3: "var r2: string"
});
goTo.marker('4');
verify.completionListContains('foo');
verify.numberOfErrorsInCurrentFile(0);