-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expand input types with coercion to work with ngtsc input type checking #17528
Conversation
aec46dd
to
98f0d18
Compare
Blocked on:
|
c6c7a1e
to
c163301
Compare
Adds a custom tslint rule to enforce that properties which use coercion in a setter also declare a static property to indicate the accepted types to ngtsc. Also handles inherited setters and properties coming from an interface being implemented (necessary to support mixins). Relates to angular#17528.
90c626d
to
5e696c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Needs rebase |
5e696c1
to
2b0a19e
Compare
2b0a19e
to
e2f29ab
Compare
Workaround for angular/angular#33451. This makes sense at the current time since the Bazel output does *never* work with strict metadata emit... and considering that with Ivy there is no metadata anyway, it could be disabled in the meanwhile.
We are temporarily disabling strict attribute type checking since we have a few templates that set a coerced input while the `NgModel` directive is applied. In those cases, the empty string for the `disabled` input, is not assignable to the `NgModel#disabled` input, since it does not do coercion. We need to figure out what to do in those scenarios.
e2f29ab
to
d9d5683
Compare
@andrewseguin Rebased. I had to fix a couple of newly introduced coercion inputs, so I think as soon as this is green, it would be good to merge it. |
Adds a custom tslint rule to enforce that properties which use coercion in a setter also declare a static property to indicate the accepted types to ngtsc. Also handles inherited setters and properties coming from an interface being implemented (necessary to support mixins). Relates to angular#17528.
Adds a custom tslint rule to enforce that properties which use coercion in a setter also declare a static property to indicate the accepted types to ngtsc. Also handles inherited setters and properties coming from an interface being implemented (necessary to support mixins). Relates to angular#17528.
There is still a problem with async pipe:
|
#17536) Adds a custom tslint rule to enforce that properties which use coercion in a setter also declare a static property to indicate the accepted types to ngtsc. Also handles inherited setters and properties coming from an interface being implemented (necessary to support mixins). Relates to #17528.
Follow-up from angular#17528 that: * Turns on the `coercion-types` rule. * Fixes the rule not detecting abstract directives properly. * Fixes the rule incorrectly flagging coercion functions used inside of callbacks which are inside of setters. * Either fixes or works around a final set of failures.
Follow-up from angular#17528 that: * Turns on the `coercion-types` rule. * Fixes the rule not detecting abstract directives properly. * Fixes the rule incorrectly flagging coercion functions used inside of callbacks which are inside of setters. * Either fixes or works around a final set of failures.
Follow-up from angular#17528 that: * Turns on the `coercion-types` rule. * Fixes the rule not detecting abstract directives properly. * Fixes the rule incorrectly flagging coercion functions used inside of callbacks which are inside of setters. * Either fixes or works around a final set of failures.
Follow-up from angular#17528 that: * Turns on the `coercion-types` rule. * Fixes the rule not detecting abstract directives properly. * Fixes the rule incorrectly flagging coercion functions used inside of callbacks which are inside of setters. * Either fixes or works around a final set of failures.
Follow-up from #17528 that: * Turns on the `coercion-types` rule. * Fixes the rule not detecting abstract directives properly. * Fixes the rule incorrectly flagging coercion functions used inside of callbacks which are inside of setters. * Either fixes or works around a final set of failures.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Related to #17495