2016-06-24 22:56:45 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
2016-08-06 02:53:04 +02:00
|
|
|
// Should give completions for ambiently declared modules
|
|
|
|
|
2016-06-24 22:56:45 +02:00
|
|
|
// @Filename: test0.ts
|
2016-07-06 02:01:26 +02:00
|
|
|
//// /// <reference path="./ambientModules.d.ts" />
|
|
|
|
//// /// <reference path="./ambientModules2.d.ts" />
|
2016-06-27 22:06:40 +02:00
|
|
|
//// import * as foo1 from "/*import_as0*/
|
|
|
|
//// import * as foo2 from "a/*import_as1*/
|
2016-06-24 22:56:45 +02:00
|
|
|
|
2016-06-27 22:06:40 +02:00
|
|
|
//// import foo3 = require("/*import_equals0*/
|
|
|
|
//// import foo4 = require("a/*import_equals1*/
|
|
|
|
|
|
|
|
//// var foo5 = require("/*require0*/
|
|
|
|
//// var foo6 = require("a/*require1*/
|
2016-06-24 22:56:45 +02:00
|
|
|
|
|
|
|
// @Filename: ambientModules.d.ts
|
|
|
|
//// declare module "ambientModule" {}
|
2018-05-01 22:00:13 +02:00
|
|
|
//// declare module "otherAmbientModule" {}
|
2016-06-24 22:56:45 +02:00
|
|
|
|
|
|
|
// @Filename: ambientModules2.d.ts
|
2018-05-01 22:00:13 +02:00
|
|
|
//// declare module "otherOtherAmbientModule" {}
|
|
|
|
|
|
|
|
verify.completions({
|
2018-05-03 22:04:08 +02:00
|
|
|
marker: test.markerNames().filter(k => k.endsWith("0")),
|
|
|
|
exact: ["ambientModule", "otherAmbientModule", "otherOtherAmbientModule"],
|
2018-05-01 22:00:13 +02:00
|
|
|
isNewIdentifierLocation: true,
|
|
|
|
});
|
|
|
|
verify.completions({
|
2018-05-03 22:04:08 +02:00
|
|
|
marker: test.markerNames().filter(k => !k.endsWith("0")),
|
|
|
|
exact: "ambientModule",
|
2018-05-01 22:00:13 +02:00
|
|
|
isNewIdentifierLocation: true,
|
|
|
|
});
|