angular-cn/packages/compiler-cli
JoostK 0937062a64 fix(ivy): type-checking should infer string type for interpolations (#30177)
Previously, interpolations were generated into TCBs as a comma-separated
list of expressions, letting TypeScript infer the type of the expression
as the type of the last expression in the chain. This is undesirable, as
interpolations always result in a string type at runtime. Therefore,
type-checking of bindings such as `<img src="{{ link }}"/>` where `link`
is an object would incorrectly report a type-error.

This commit adjusts the emitted TCB code for interpolations, where a
chain of string concatenations is emitted, starting with the empty string.
This ensures that the inferred type of the interpolation is of type string.

PR Close #30177
2019-05-17 09:55:11 -07:00
..
integrationtest test: fix several bazel compiler-cli tests in windows (#30189) 2019-05-07 10:21:36 -07:00
ngcc test(ivy): ngcc - fix tests to work on Windows (#30520) 2019-05-16 13:32:02 -07:00
src fix(ivy): type-checking should infer string type for interpolations (#30177) 2019-05-17 09:55:11 -07:00
test feat(ivy): more accurate type narrowing for `ngIf` directive (#30248) 2019-05-16 09:48:40 -07:00
BUILD.bazel build: update rules_nodejs and clean up bazel warnings (#30370) 2019-05-14 10:08:45 -07:00
index.ts feat(compiler-cli): export tooling definitions (#29929) 2019-04-17 17:23:01 -07:00
ngtools2.ts refactor(compiler-cli): expose ngtools api separately (#18978) 2017-08-31 14:37:13 -07:00
package.json build: upgrade yargs package to 13.1.0 (#29722) 2019-04-26 16:29:29 -07:00
tsconfig-build.json build(compiler-cli): enable full TypeScript strictness (#29436) 2019-03-21 12:14:39 -04:00
tsconfig.json build(compiler-cli): enable full TypeScript strictness (#29436) 2019-03-21 12:14:39 -04:00