Files
tsgo/testdata/baselines/reference/submodule/conformance/nestedDestructuringOfRequire.js

37 lines
543 B
TypeScript

//// [tests/cases/conformance/salsa/nestedDestructuringOfRequire.ts] ////
//// [mod1.js]
const chalk = {
grey: {}
};
module.exports.chalk = chalk
//// [main.js]
const {
chalk: { grey }
} = require('./mod1');
grey
chalk
//// [mod1.js]
"use strict";
const chalk = {
grey: {}
};
module.exports.chalk = chalk;
//// [main.js]
"use strict";
const { chalk: { grey } } = require('./mod1');
grey;
chalk;
//// [mod1.d.ts]
export { chalk };
declare const chalk: {
grey: {};
};
//// [main.d.ts]
export {};