-
Notifications
You must be signed in to change notification settings - Fork 27.1k
feature request: mark component @input as required (vs none if not required) #11904
Description
[ ] 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
no way to enforce which are a component's required interface
Expected behavior
get a TypeScript error that component is not satisfying it's minimum interface ti work
What is the motivation / use case for changing the behavior?
I have a VERY complex component with 6 inpits, yet only 1 input is required for it to work with no errors. If I will want to re-use in in 6 months, no way will I remember what is the min input interface. Same for new users of my component.
- Angular version: 2.0.X
latest ng2
this is not a breaking change as current inputs (none req, can be left as is) so would be awesome if can be added in a minor release update.
Angular 2 Kitchen sink: http://ng2.javascriptninja.io
and source@ https://github.com/born2net/ng2Boilerplate
Regards,
Sean