2015-10-15 02:36:03 +02:00
|
|
|
///<reference path="fourslash.ts" />
|
|
|
|
|
|
|
|
// Assignments to 'exports.p' define a property 'p' even if they're not at top-level
|
|
|
|
|
2015-11-13 22:44:57 +01:00
|
|
|
// @allowJs: true
|
2015-10-15 02:36:03 +02:00
|
|
|
// @Filename: myMod.js
|
|
|
|
//// if (true) {
|
|
|
|
//// exports.b = true;
|
|
|
|
//// } else {
|
|
|
|
//// exports.n = 3;
|
|
|
|
//// }
|
|
|
|
//// function fn() {
|
|
|
|
//// exports.s = 'foo';
|
|
|
|
//// }
|
|
|
|
|
|
|
|
// @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('.');
|
|
|
|
verify.completionListContains("n", /*displayText:*/ undefined, /*documentation*/ undefined, "property");
|
|
|
|
verify.completionListContains("s", /*displayText:*/ undefined, /*documentation*/ undefined, "property");
|
|
|
|
verify.completionListContains("b", /*displayText:*/ undefined, /*documentation*/ undefined, "property");
|
|
|
|
edit.insert('n.');
|
|
|
|
verify.completionListContains("toFixed", /*displayText:*/ undefined, /*documentation*/ undefined, "method");
|