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

17 lines
191 B
TypeScript

class A {}
abstract class B extends A {}
function NewA(Factory: typeof A) {
return new A;
}
function NewB(Factory: typeof B) {
return new B;
}
NewA(A);
NewA(B);
NewB(A);
NewB(B);