refactor(ivy): abstract .d.ts file transformations (#34235) (#34340)

This commit refactors the way the compiler transforms .d.ts files during
ngtsc builds. Previously the `IvyCompilation` kept track of a
`DtsFileTransformer` for each input file. Now, any number of
`DtsTransform` operations that need to be applied to a .d.ts file are
collected in the `DtsTransformRegistry`. These are then ran using a
single `DtsTransformer` so that multiple transforms can be applied
efficiently.

PR Close #34235

PR Close #34340
This commit is contained in:
Alex Rickabaugh
2019-11-19 12:20:57 -08:00
committed by Andrew Kushnir
parent 676aca108f
commit bcebc5f4f3
5 changed files with 199 additions and 86 deletions

View File

@ -8,5 +8,5 @@
export * from './src/api';
export {IvyCompilation} from './src/compilation';
export {DtsFileTransformer, declarationTransformFactory} from './src/declaration';
export {declarationTransformFactory, DtsTransformRegistry, IvyDeclarationDtsTransform} from './src/declaration';
export {ivyTransformFactory} from './src/transform';