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

24 lines
373 B
TypeScript
Raw Normal View History

// @useDefineForClassFields: true
// @target: es2015
class Base {
}
class Sub extends Base {
// @ts-ignore
constructor(public p: number) {
console.log('hi');
super();
}
field = 0;
}
class Test extends Base {
prop: number;
// @ts-ignore
constructor(public p: number) {
1;
super();
this.prop = 1;
}
}