Closed
Description
For the program
// @filename: main.js
const x = require('ch').x
x
x.grey
// @filename: ch.js
const x = {
grey: {}
}
export { x }
Expected behavior:
No error, and x: { grey: {} }
Actual behavior:
on const x = require
, error that 'x is unused'
on x.grey
, error that 'cannot find name x'
Based on a failure from office-ui-fabric in a JS script that uses chalk. (and, notably uses export default
, so that needs to be tested too)
Works if you use commonjs exports:
const x = { grey: { } }
module.exports.x = x