// File: mod1.js
const util = exports = module.exports = {}
util.existy = function () {}
// File: main.js
const util = require('./mod1')
function n() { util.existy }
Expected behavior:
No use-before-def error.
Actual behavior:
Use-before-def error on util.existy. But there isn't one when util.existy is used at the toplevel.
Expected behavior:
No use-before-def error.
Actual behavior:
Use-before-def error on util.existy. But there isn't one when util.existy is used at the toplevel.