Workaround for Angular-generated import statements.
Workaround for Angular-generated import statements.

Angular Compiler synthesizes import statements from plain strings; these nodes do not have parse tree nodes attached (no "original node"). TypeScript compiler cannot resolve module symbols for these nodes, thus import by path fails.

This is tricky to avoid: TypeScript compiler in its various APIs generally only supports resolving modules from parse tree nodes. As a workaround, we can fall back to an API that's specific to ambient module declarations.

PiperOrigin-RevId: 344964727

angular/tsickle,angular/tsickle