Closed
Description
If an exported class extends a non-exported class, it should be possible to erase the non-exported class from the public API by copying it's interface to the derived class. This is allowed in TypeScript and there is no reason it won't be allowed in jsii.
The compiler should respect any public bases of the erased class and copy those as well to the derived class.
This is already supported for interfaces.
Repro:
export class PublicBaseOfBase {
public foo() { }
}
class PrivateBase extends PublicBaseOfBase {
public goo() { }
}
export class Derived extends PrivateBase {
public noo() { }
}
After erasure, the API of Derived
should be:
class Derived extends PublicBaseOfBase {
public goo() { }
public noo() { }
}