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

5 lines
138 B
TypeScript

function foo() { }
var x = new foo(); // can be used as a constructor function
class C extends foo { } // error, cannot extend it though