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

13 lines
206 B
TypeScript

class Base {
constructor(protected p: number) { }
}
class Derived extends Base {
constructor(public p: number) {
super(p);
this.p; // OK
}
}
var d: Derived;
d.p; // public, OK