Pete Bacon Darwin
fafa50d97f
fix(ngcc): support ModuleWithProviders functions that delegate (#36948)
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
Angular
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
68.6%
HTML
12.8%
JavaScript
8.4%
Pug
7%
Starlark
1.4%
Other
1.7%