angular/packages/compiler-cli/src/ngtsc/partial_evaluator/test
Alex Rickabaugh c614f31fc1 refactor(compiler-cli): rework ForeignFunctionResolvers (#45701)
This commit reworks the partial evaluation system's concept of a
ForeignFunctionResolver. Previously, resolvers were expected to return a
`ts.Expression` which the partial evaluator would continue evaluating,
eventually returning a value.

This works well for "transparent" foreign functions like `forwardRef`,
but for things like `ModuleWithProviders` it breaks down, because the
desired resolution value (the NgModule `Reference`) is _not_ the "correct"
evaluation of the function call.

To support better FFR implementations, this commit refactors the FFR system
so that resolvers operate on the `ts.CallExpression` instead, and are
given a callback to resolve further expressions if needed. If they cannot
resolve a given call expression, they have an `unresolvable` value that they
can return to indicate that.

PR Close #45701
2022-04-26 10:07:23 -07:00
..
BUILD.bazel build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
diagnostics_spec.ts refactor: replace deprecated String.prototype.substr() (#45397) 2022-03-24 11:48:09 -07:00
evaluator_spec.ts refactor(compiler): remove usages of deprecated AST creation functions (#45134) 2022-02-22 10:22:47 -08:00
utils.ts refactor(compiler-cli): rework ForeignFunctionResolvers (#45701) 2022-04-26 10:07:23 -07:00