Closed
Description
I want to be able to make the implementation optional for abstract member, but it seems like it is not doable today.
abstract class Component {
public abstract setText?(l: GetLocalization): void;
public abstract bindInteractions?(): void;
}
I have some component classes and they MUST extend the base component class and optionally implement certain methods with a certain signature. Right now, I can only rely on good documentation.
class Post extends Component {
public setText(l: GetLocalization): void {
//...
}
// Though I don't want to implement bindInteractions method.
}
I want the power of auto-completion to also kick in.
Why is this useful?
It is useful for classes with life cycle methods.