mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
c614f31fc1
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
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT