fix(compiler): reexport less symbols in .ngfactory.ts files (#19884)

* don't reexport symbols that the user already reexported
* never reexport symbols that are part of arguments of non simple function calls

Fixes #19883

PR Close #19884
This commit is contained in:
Tobias Bosch
2017-10-23 17:51:19 -07:00
committed by Matias Niemelä
parent 04eb80cc2b
commit 420852e2f5
7 changed files with 284 additions and 65 deletions

View File

@ -58,4 +58,14 @@ export function summaryForJitName(symbolName: string): string {
export function stripSummaryForJitNameSuffix(symbolName: string): string {
return symbolName.replace(JIT_SUMMARY_NAME, '');
}
}
const LOWERED_SYMBOL = /\u0275\d+/;
export function isLoweredSymbol(name: string) {
return LOWERED_SYMBOL.test(name);
}
export function createLoweredSymbol(id: number): string {
return `\u0275${id}`;
}