mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
In some cases TypeScript is unable to identify a valid symbol for an export. In this case it returns an "unknown" symbol, which does not reference any declarations. This fix ensures that ngcc does not crash if such a symbol is encountered by checking whether `symbol.declarations` exists before accessing it. The commit does not contain a unit test as it was not possible to recreate a scenario that had such an "unknown" symbol in the unit test environment. The fix has been manually checked against that original issue; and also this check is equivalent to similar checks elsewhere in the code, e.g. https://github.com/angular/angular/blob/8d0de89e/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts#L309 Fixes #34560 PR Close #34658 |
||
|---|---|---|
| .. | ||
| diagnostics | ||
| metadata | ||
| ngtsc | ||
| transformers | ||
| extract_i18n.ts | ||
| language_services.ts | ||
| main.ts | ||
| perform_compile.ts | ||
| perform_watch.ts | ||
| tooling.ts | ||
| typescript_support.ts | ||
| version.ts | ||