https://github.com/angular/angular
Revision 4c482bf3f1768a18b35e0648c91029504a8d8649 authored by JoostK on 03 July 2021, 22:59:46 UTC, committed by Andrew Kushnir on 12 July 2021, 18:48:34 UTC
In #42492 the template type checker became capable of replicating a
wider range of generic type parameters for use in template type-check
files. Any literal types within a type parameter would however emit
invalid code, as TypeScript was emitting the literals using the text as
extracted from the template type-check file instead of the original
source file where the type node was taken from.

This commit works around the issue by cloning any literal types and
marking them as synthetic, signalling to TypeScript that the literal
text has to be extracted from the node itself instead from the source
file.

This commit also excludes `import()` type nodes from being supported,
as their module specifier may potentially need to be rewritten.

Fixes #42667

PR Close #42761
1 parent 40da386
History
Tip revision: 4c482bf3f1768a18b35e0648c91029504a8d8649 authored by JoostK on 03 July 2021, 22:59:46 UTC
fix(compiler-cli): properly emit literal types when recreating type parameters in a different file (#42761)
Tip revision: 4c482bf
File Mode Size
.circleci
.devcontainer
.github
.husky
.ng-dev
.vscode
.yarn
aio
dev-infra
docs
goldens
integration
modules
packages
scripts
third_party
tools
.bazelignore -rw-r--r-- 4.2 KB
.bazelrc -rw-r--r-- 6.4 KB
.bazelversion -rw-r--r-- 6 bytes
.clang-format -rw-r--r-- 73 bytes
.editorconfig -rw-r--r-- 245 bytes
.gitattributes -rw-r--r-- 314 bytes
.gitignore -rw-r--r-- 843 bytes
.gitmessage -rw-r--r-- 7.2 KB
.mailmap -rw-r--r-- 51 bytes
.npmrc -rw-r--r-- 21 bytes
.nvmrc -rw-r--r-- 8 bytes
.prettierrc -rw-r--r-- 157 bytes
.pullapprove.yml -rw-r--r-- 48.1 KB
.yarnrc -rw-r--r-- 130 bytes
BUILD.bazel -rw-r--r-- 2.0 KB
CHANGELOG.md -rw-r--r-- 902.2 KB
CODE_OF_CONDUCT.md -rw-r--r-- 1.1 KB
CONTRIBUTING.md -rw-r--r-- 15.5 KB
LICENSE -rw-r--r-- 1.1 KB
README.md -rw-r--r-- 4.7 KB
WORKSPACE -rw-r--r-- 1.6 KB
browser-providers.conf.js -rw-r--r-- 8.4 KB
gulpfile.js -rw-r--r-- 812 bytes
karma-js.conf.js -rw-r--r-- 8.1 KB
package.json -rw-r--r-- 8.6 KB
renovate.json -rw-r--r-- 2.7 KB
test-events.js -rw-r--r-- 259 bytes
test-main.js -rw-r--r-- 9.4 KB
tslint.json -rw-r--r-- 2.8 KB
yarn.lock -rw-r--r-- 615.8 KB
yarn.lock.readme.md -rw-r--r-- 1.3 KB

README.md

back to top