TypeScript/tests/cases/fourslash/exportEqualTypes.ts

24 lines
803 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
/// <reference path='./fourslash.ts'/>
// @Filename: exportEqualTypes_file0.ts
////interface x {
//// (): Date;
//// foo: string;
////}
////export = x;
// @Filename: exportEqualTypes_file1.ts
///////<reference path='exportEqualTypes_file0.ts'/>
2016-02-13 00:40:47 +01:00
////import test = require('./exportEqualTypes_file0');
2014-10-07 20:30:27 +02:00
////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'
2014-07-13 01:04:16 +02:00
2016-09-09 18:02:55 +02:00
verify.quickInfos({
1: "(alias) interface test\nimport test = require('./exportEqualTypes_file0')",
2016-09-09 18:02:55 +02:00
2: "var r1: Date",
3: "var r2: string"
});
verify.completions({ marker: "4", exact: ["foo", ...completion.functionMembersWithPrototype] });
verify.noErrors();