For the program
// @filename: main.jsconstx=require('ch').xxx.grey// @filename: ch.jsconstx={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:
constx={grey: {}}module.exports.x=x
For the program
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: