-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Description
I'm submitting a ... (check one with "x")
[ ] bug report => search github for a similar issue or PR before submitting
[ x ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
I am extending the functionality from FormGroup with my own type. But I have some re-usability problems.
Right now the constructor at FormGroup is like:
constructor( public controls: {[key: string]: AbstractControl}, .....) {}
which does not allow to delegate functions like insert, get and iterate on controls to my derived class. Why not receiving an ES6 Map instead?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
Since "operators overloads" have been declined in Typescript (here), there is no nice way for me to, for instance, keep FormGroup children and FormControl on different objects.
I can submit a PR if you think it makes sense and I have a chance.