In Ivy's template type checker, event bindings are checked in a closure to allow for accurate type inference of the `$event` parameter. Because of the closure, any narrowing effects of template guards will no longer be in effect when checking the event binding, as TypeScript assumes that the guard outside of the closure may no longer be true once the closure is invoked. For more information on TypeScript's Control Flow Analysis, please refer to https://github.com/microsoft/TypeScript/issues/9998. In Angular templates, it is known that an event binding can only be executed when the view it occurs in is currently rendered, hence the corresponding template guard is known to hold during the invocation of an event handler closure. As such, it is desirable that any narrowing effects from template guards are still in effect within the event handler closure. This commit tweaks the generated Type-Check Block (TCB) to repeat all template guards within an event handler closure. This achieves the narrowing effect of the guards even within the closure. Fixes #35073 PR Close #35193
build: migrate references and scripts that set to build with ivy via compile=aot to use config=ivy (#33983)
refactor: simplify bazel saucelabs targets using karma pre-test wrapper and shared saucelabs connection between tests (#34769)
refactor: simplify bazel saucelabs targets using karma pre-test wrapper and shared saucelabs connection between tests (#34769)
Angular
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
68.6%
HTML
12.8%
JavaScript
8.4%
Pug
7%
Starlark
1.4%
Other
1.7%