angular/packages/compiler-cli/private
Andrew Scott 6fee6514c2 refactor(compiler-cli): decouple SymbolBuilder from BoundTarget and minimize adapter surface
Decouple `SymbolBuilder` from the full `BoundTarget` interface by introducing a purpose-built `SymbolBoundTarget` interface containing only the 4 methods required for symbol resolution. This eliminates the need for the large, pass-through `BoundTargetAdapter` and further isolates `SymbolBuilder` from compiler-internal implementation details.

Also minimize `TypeCheckableDirectiveMetaAdapter` by redefining `SymbolDirectiveMeta` to not extend `DirectiveMeta`, exposing only the properties actually used by `SymbolBuilder`.

Removed dead code `getDirectiveMeta` in `template_symbol_builder.ts` which was unused.

These changes improve maintainability and ensure a cleaner architecture by strictly defining the boundaries of what `SymbolBuilder` needs from the rest of the system.
By limiting the required inputs to only what's necessary for the implementation, we make it easier to re-use
the implementation between different compiler architectures
2026-04-08 11:33:41 -07:00
..
BUILD.bazel refactor(compiler-cli): Export hybrid analysis from bin 2026-03-10 11:41:50 -07:00
hybrid_analysis.ts refactor(compiler-cli): decouple SymbolBuilder from BoundTarget and minimize adapter surface 2026-04-08 11:33:41 -07:00
localize.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
migrations.ts refactor(compiler-cli): Remove deep imports of compiler-cli in angular/core 2025-10-28 15:58:56 +01:00
README.md build: format md files 2025-11-06 10:03:05 -08:00
testing.ts Revert "refactor(compiler-cli): remove deep imports from compiler-cli (#64732)" 2025-11-06 13:09:01 -08:00
tooling.ts refactor(compiler-cli): Export more things needed by external TCB generation 2026-03-09 16:58:48 -07:00

This is a directory defining the @angular/compiler-cli/private entry-point. The entry-point can be used to expose code that is needed by other Angular framework packages, without having to expose code through the primary entry-point.

The primary entry-point has a couple of downsides when it comes to cross-package imports:

  • It exports various other things that will end up creating additional type dependencies. e.g. when the Angular localize package relies on it, it might end up accidentally relying on @types/node.
  • The primary entry-point has a larger build graph, slowing down local development as much more things can invalidate the dependent targets. A smaller subset leads to faster incremental builds.