angular-cn/packages/compiler-cli
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
..
integrationtest feat: remove @angular/http (#27038) 2020-05-05 17:42:01 -07:00
ngcc fix(ngcc): support ModuleWithProviders functions that delegate (#36948) 2020-05-06 13:35:48 -07:00
src perf(compiler-cli): perform template type-checking incrementally (#36211) 2020-05-05 18:40:42 -07:00
test perf(compiler-cli): perform template type-checking incrementally (#36211) 2020-05-05 18:40:42 -07:00
BUILD.bazel perf(compiler-cli): split Ivy template type-checking into multiple files (#36211) 2020-05-05 18:40:42 -07:00
index.ts refactor(compiler-cli): Move diagnostics files to language service (#33809) 2019-11-14 09:29:07 -08:00
package.json build: remove typescript 3.6 and 3.7 support (#36329) 2020-05-05 16:52:43 -07:00
tsconfig-build.json build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00
tsconfig.json perf(ivy): ngcc - only find dependencies when targeting a single entry-point (#30525) 2019-07-09 09:40:46 -07:00