-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionOut of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraintsSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Calling super()
within a constructor is a bit redundant and annoying... can we have it called implicitly if call to super is omitted?
For example this
class Manager extends Employee {
constructor() {
this.title = "The Manager";
}
}
should be equivalent to
class Manager extends Employee {
constructor() {
super(); // call to default constructor added implicitly
this.title = "The Manager";
}
}
(C# also does a similar thing and it's a nice feature).
Metadata
Metadata
Assignees
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionOut of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraintsSuggestionAn idea for TypeScriptAn idea for TypeScript