swc/crates/swc_ecma_parser/tests/tsc/commonJSAliasedExport.ts

19 lines
368 B
TypeScript
Raw Normal View History

// @checkJs: true
// @outdir: out/
// @declaration: true
// @Filename: commonJSAliasedExport.js
const donkey = (ast) => ast;
function funky(declaration) {
return false;
}
module.exports = donkey;
module.exports.funky = funky;
// @Filename: bug43713.js
const { funky } = require('./commonJSAliasedExport');
/** @type {boolean} */
var diddy
var diddy = funky(1)