angular/packages/compiler-cli
Alex Rickabaugh bf01b665bc fix(ivy): wrap 'as any' casts in parentheses when needed (#34649)
Previously, when generating template type-checking code, casts to 'any' were
produced as `expr as any`, regardless of the expression. However, for
certain expression types, this led to precedence issues with the cast. For
example, `a !== b` is a `ts.BinaryExpression`, and wrapping it directly in
the cast yields `a !== b as any`, which is semantically equivalent to
`a !== (b as any)`. This is obviously not what is intended.

Instead, this commit adds a list of expression types for which a "bare"
wrapping is permitted. For other expressions, parentheses are added to
ensure correct precedence: `(a !== b) as any`

PR Close #34649
2020-01-23 10:31:49 -08:00
..
integrationtest build: derive ts_library dep from jasmine_node_test boostrap label if it ends in _es5 (#34736) 2020-01-15 14:58:09 -05:00
ngcc fix(ngcc): libraries using spread in object literals cannot be processed (#34661) 2020-01-23 10:29:58 -08:00
src fix(ivy): wrap 'as any' casts in parentheses when needed (#34649) 2020-01-23 10:31:49 -08:00
test fix(ivy): type-checking of properties which map to multiple fields (#34649) 2020-01-23 10:31:48 -08:00
BUILD.bazel build: upgrade to rules_nodejs 1.0.0 (first stable release) (#34736) 2020-01-15 14:58:08 -05:00
index.ts refactor(compiler-cli): Move diagnostics files to language service (#33809) 2019-11-14 09:29:07 -08:00
package.json feat(compiler-cli): require node 10 as runtime engine (#34722) 2020-01-22 15:35:35 -08:00
tsconfig-build.json build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00
tsconfig.json perf(ivy): ngcc - only find dependencies when targeting a single entry-point (#30525) 2019-07-09 09:40:46 -07:00