Files
angular/packages/compiler-cli
Kristiyan Kostadinov 710c2c7857 fix(compiler): avoid hitting TypeScript limits if template has many translations
Currently each i18n expression involves declaring a variable and `if`/`else` blocks that assign to that variable. These expressions are inlined inside the `consts` of a component. The problem is that if there are many i18n expressions in a template (seems to be ~600), we end up hitting TypeScript's control flow analysis limit which produces an error.

These changes resolve the issue by detecting when we've extracted more than 250 messages (to be safe) and any remaining translations into separate functions.

(cherry picked from commit a2e62f6824)
2026-09-17 21:00:42 +00:00
..
2026-04-23 11:38:26 -07:00