Commit ed0568b
fix: align linker output with Angular TypeScript compiler (#91)
- fix `deps: null` to use `ɵɵgetInheritedFactory` instead of no-args constructor
- fix `deps: 'invalid'` to emit `ɵɵinvalidFactory()`
- add ForPipe flag (16) for Pipe dependency inject calls
- fix `attribute: true` to use token as arg to `ɵɵinjectAttribute`
- handle `token: null` deps with `ɵɵinvalidFactoryDep(index)`
- fix `useClass != type` without deps to delegate to `useClass.ɵfac`
- omit `providedIn` when null (matching TS behavior)
- refactor `extract_deps_source` to take target param, generate correct
inject function directly instead of fragile string replacement
- only emit `standalone: false` (omit when true, matching TS default)
- remove extra `type` property from `defineInjector` output
- omit `declarations`/`imports`/`exports` from `defineNgModule` in AOT mode
- add `id` support and `registerNgModuleType` IIFE side-effect for NgModules
- fix `link_injectable` to use conditional factory pattern for useValue,
useExisting, useFactory (with deps), and useClass (with deps)
- fix `useFactory` without deps to wrap as `() => factory()`
- fix `useClass === type` without deps to include `__ngFactoryType__` param
- fix `link_class_metadata_async` to extract callback params and read
decorators/ctorParameters/propDecorators from resolveMetadata return value
Close #89
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent fc99e78 commit ed0568b
1 file changed
+865
-97
lines changed
0 commit comments