/** * Angular Provider Table (pass 1, Angular flavor) * * The Angular analog of `bindings.ts` (Inversify): scans the program and maps * Angular's provider forms onto the SAME token-keyed {@link BindingTable} the * shared walker consumes, so `angular-analyzer.ts` reuses every downstream * mechanism (leaf labeling, factory-dep edges, unresolved handling). * * Provider sources (v1 flat global table — component-scoped shadowing is an * accepted approximation): * - Any `providers: [...]` array (ApplicationConfig, `@Component`, `@Directive`) * - `@Injectable({ providedIn: 'root' | 'platform' | 'any' })` self-registration * * Provider forms per array element: * - bare class `Foo` → to/self binding (implClass=Foo) * - `{ provide, useClass }` → to binding (implClass) * - `{ provide, useValue }` → toConstantValue leaf * - `{ provide, useFactory, deps: [A, B] }` → toDynamicValue leaf + factoryDeps * - `{ provide, useExisting }` → alias → target impl class * - `multi: true` → multiple bindings per token (fan-out) * * Framework-internal `provideXxx()` calls (`provideRouter`, * `provideZoneChangeDetection`, ...) have no DI leaves and are skipped. */ import * as ts from 'typescript'; import { BindingTable } from './bindings'; /** * Collect every Angular provider in the program into a token-keyed table. * `checker` is required so cross-package class tokens (`SaveApi`, `ClientConfig`) * resolve to the same declaration the injection sites reference. */ export declare function collectAngularProviders(program: ts.Program, checker: ts.TypeChecker, workspaceRoot: string): BindingTable;