TypeScript/tests/cases/conformance/jsdoc/moduleExportsElementAccessAssignment2.ts
Andrew Branch e2b4c12596
Detect unbindable exports before setting CommonJS module indicator (#33784)
* Detect unbindable exports before setting CommonJS module indicator

* Fix comment

* Fix unrelated lint?
2019-10-04 11:52:38 -05:00

23 lines
391 B
TypeScript

// @noEmit: true
// @checkJs: true
// @allowJs: true
// @strict: true
// @Filename: file1.js
// this file _should_ be a global file
var GlobalThing = { x: 12 };
/**
* @param {*} type
* @param {*} ctor
* @param {*} exports
*/
function f(type, ctor, exports) {
if (typeof exports !== "undefined") {
exports["AST_" + type] = ctor;
}
}
// @Filename: ref.js
GlobalThing.x