angular-cn/packages/compiler-cli/ngcc/test/rendering
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
..
commonjs_rendering_formatter_spec.ts style(ngcc): reformat of ngcc after clang update (#36447) 2020-04-06 09:26:57 -07:00
dts_renderer_spec.ts fix(ngcc): support ModuleWithProviders functions that delegate (#36948) 2020-05-06 13:35:48 -07:00
esm5_rendering_formatter_spec.ts style(ngcc): reformat of ngcc after clang update (#36447) 2020-04-06 09:26:57 -07:00
esm_rendering_formatter_spec.ts fix(ngcc): support ModuleWithProviders functions that delegate (#36948) 2020-05-06 13:35:48 -07:00
renderer_spec.ts style(ngcc): reformat of ngcc after clang update (#36447) 2020-04-06 09:26:57 -07:00
umd_rendering_formatter_spec.ts style(ngcc): reformat of ngcc after clang update (#36447) 2020-04-06 09:26:57 -07:00