You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Javascript should support property assignments on exports, even when aliased #22436
// @allowJs: true
// @checkJs: true
// @noEmit: true
// @Filename: semver.js
exports = module.exports = C
exports.f = n => n + 1
function C() {
this.p = 1
}
// @filename: index.js
const C = require("./semver")
var two = C.f(1)
var c = new C
Expected behavior:
In index.js, f should be a member of C.
Actual behavior:
It is not.
Note that if you assign to C, fis visible, but only if the assignment occurs after function C () { ... }. But that's a separate bug.
Activity