swc/tests/fixture/issue-1729/case2/output/index.ts

14 lines
286 B
TypeScript
Raw Normal View History

function createConstructor(callback) {
let klass;
return (...args)=>{
if (klass === undefined) {
klass = callback();
}
return new klass(...args);
};
}
const constructor = createConstructor(()=>class {
}
);
console.log(constructor());