-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Out 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
Allow a declarative way of adding members to an existing type's prototype
Example:
class Shape {
// ...
}
/* ...elsewhere...*/
extension class Shape { // Syntax??
getArea() { return /* ... */; }
}
var x = new Shape();
console.log(x.getArea()); // OK
ilio, KeesCBakker, majo44, s5no5t, martinnormark and 67 more
Metadata
Metadata
Assignees
Labels
Out 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