mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
In #36892 the `ModuleWithProviders` type parameter becomes required. This exposes a bug in ngcc, where it can only handle functions that have a specific form: ``` function forRoot() { return { ... }; } ``` In other words, it only accepts functions that return an object literal. In some libraries, the function instead returns a call to another function. For example in `angular-in-memory-web-api`: ``` InMemoryWebApiModule.forFeature = function (dbCreator, options) { return InMemoryWebApiModule_1.forRoot(dbCreator, options); }; ``` This commit changes the parsing of such functions to use the `PartialEvaluator`, which can evaluate these more complex function bodies. PR Close #36948 |
||
|---|---|---|
| .. | ||
| decoration_analyzer_spec.ts | ||
| migration_host_spec.ts | ||
| module_with_providers_analyzer_spec.ts | ||
| ngcc_trait_compiler_spec.ts | ||
| private_declarations_analyzer_spec.ts | ||
| references_registry_spec.ts | ||
| switch_marker_analyzer_spec.ts | ||
| util_spec.ts | ||