mirror of
https://github.com/swc-project/swc.git
synced 2024-12-03 00:54:25 +03:00
30 lines
410 B
TypeScript
30 lines
410 B
TypeScript
// @allowJs: true
|
|
// @checkJs: true
|
|
// @target: es5
|
|
// @outDir: ./out
|
|
// @declaration: true
|
|
// @filename: lib.js
|
|
/**
|
|
* @param {string} a
|
|
*/
|
|
function bar(a) {
|
|
return a + a;
|
|
}
|
|
|
|
class SomeClass {
|
|
a() {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
bar,
|
|
SomeClass
|
|
}
|
|
// @filename: main.js
|
|
const { SomeClass, SomeClass: Another } = require('./lib');
|
|
|
|
module.exports = {
|
|
SomeClass,
|
|
Another
|
|
} |