File: exportEqualTypes.ts

package info (click to toggle)
node-typescript 4.8.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 523,068 kB
  • sloc: javascript: 1,735,777; makefile: 7; sh: 1
file content (23 lines) | stat: -rw-r--r-- 804 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/// <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: "(alias) interface test\nimport test = require('./exportEqualTypes_file0')",
    2: "var r1: Date",
    3: "var r2: string"
});
verify.completions({ marker: "4", exact: completion.functionMembersWithPrototypePlus(["foo"]) });
verify.noErrors();