2015-10-15 02:36:03 +02:00
|
|
|
///<reference path="fourslash.ts" />
|
|
|
|
|
|
|
|
// Assignments to 'exports.p' define a property 'p'
|
|
|
|
|
2015-11-13 22:44:57 +01:00
|
|
|
// @allowJs: true
|
2015-10-15 02:36:03 +02:00
|
|
|
// @Filename: myMod.js
|
|
|
|
//// exports.n = 3;
|
|
|
|
//// exports.s = 'foo';
|
|
|
|
//// exports.b = true;
|
|
|
|
|
|
|
|
// @Filename: consumer.js
|
2016-02-13 00:40:47 +01:00
|
|
|
//// var x = require('./myMod');
|
2015-10-15 02:36:03 +02:00
|
|
|
//// x/**/;
|
|
|
|
|
|
|
|
goTo.file('consumer.js');
|
|
|
|
goTo.marker();
|
|
|
|
edit.insert('.');
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({
|
|
|
|
exact: [
|
|
|
|
...["n", "s", "b"].map(name => ({ name, kind: "property" })),
|
2019-05-16 23:46:10 +02:00
|
|
|
...["x", "require"].map(name => ({ name, kind: "warning", sortText: completion.SortText.JavascriptIdentifiers })),
|
2018-10-29 18:03:25 +01:00
|
|
|
],
|
|
|
|
});
|
2015-10-15 02:36:03 +02:00
|
|
|
edit.insert('n.');
|
2018-10-30 19:56:34 +01:00
|
|
|
verify.completions({ includes: { name: "toFixed", kind: "method", kindModifiers: "declare" } });
|