mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
c5c20e9d86
In the past two-way bindings used to be interpreted as `foo = $event` at the parser level. In #54065 it was changed to preserve the actual expression, because it was problematic for supporting two-way binding to signals. This unintentionally ended up causing the TCB to two-way bindings to look something like `someOutput.subscribe($event => expr);` which does nothing. It largely hasn't been a problem, because the input side of two-way bindings was still being checked, except for the case where the input side of the two-way binding has a wider type than the output side. These changes re-add type checking for the output side by generating the following TCB instead: ``` someOutput.subscribe($event => { var _t1 = unwrapSignalValue(this.someField); _t1 = $event; }); ``` PR Close #59002