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

22 lines
392 B
TypeScript

// @allowJs: true
// @checkJs: true
// @outDir: ./out
// @declaration: true
// @filename: utils/errors.js
class FancyError extends Error {
constructor(status) {
super(`error with status ${status}`);
}
}
module.exports = {
FancyError
};
// @filename: utils/index.js
// issue arises here on compilation
const errors = require("./errors");
module.exports = {
errors
};