angular-cn/packages/compiler-cli/ngcc/test/analysis
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
2020-05-06 13:35:48 -07:00
..
decoration_analyzer_spec.ts fix(ngcc): correctly detect external files from nested `node_modules/` (#36559) 2020-04-10 09:10:26 -07:00
migration_host_spec.ts fix(ngcc): correctly detect external files from nested `node_modules/` (#36559) 2020-04-10 09:10:26 -07:00
module_with_providers_analyzer_spec.ts fix(ngcc): support ModuleWithProviders functions that delegate (#36948) 2020-05-06 13:35:48 -07:00
ngcc_trait_compiler_spec.ts style(ngcc): reformat of ngcc after clang update (#36447) 2020-04-06 09:26:57 -07:00
private_declarations_analyzer_spec.ts style(ngcc): reformat of ngcc after clang update (#36447) 2020-04-06 09:26:57 -07:00
references_registry_spec.ts style(ngcc): reformat of ngcc after clang update (#36447) 2020-04-06 09:26:57 -07:00
switch_marker_analyzer_spec.ts fix(ngcc): correctly detect external files from nested `node_modules/` (#36559) 2020-04-10 09:10:26 -07:00
util_spec.ts fix(ngcc): correctly detect external files from nested `node_modules/` (#36559) 2020-04-10 09:10:26 -07:00