// @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, f is visible, but only if the assignment occurs after function C () { ... }. But that's a separate bug.
Expected behavior:
In index.js,
fshould be a member ofC.Actual behavior:
It is not.
Note that if you assign to C,
fis visible, but only if the assignment occurs afterfunction C () { ... }. But that's a separate bug.