-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Needs More InfoThe issue still hasn't been fully clarifiedThe issue still hasn't been fully clarifiedSuggestionAn idea for TypeScriptAn idea for TypeScript
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.
bcherny, dchacke, vilicvane, fjozsef, adrian-moisa and 59 morecvsguimaraes
Metadata
Metadata
Assignees
Labels
Needs More InfoThe issue still hasn't been fully clarifiedThe issue still hasn't been fully clarifiedSuggestionAn idea for TypeScriptAn idea for TypeScript