angular/packages/compiler-cli
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
..
integrationtest build: migrate more usages from @bazel/typescript to @bazel/concatjs (#45431) 2022-03-25 12:18:34 -07:00
linker refactor(compiler-cli): emit NgModule dependencies of standalone components (#45672) 2022-04-20 05:45:56 -07:00
ngcc refactor(compiler-cli): propagate standalone flag in .d.ts metadata (#45672) 2022-04-20 05:45:57 -07:00
private refactor(localize): update version of Babel (#44931) 2022-02-24 21:42:54 +00:00
src refactor(compiler-cli): rework ForeignFunctionResolvers (#45701) 2022-04-26 10:07:23 -07:00
test test(compiler-cli): tests for standalone components/directives/pipes (#45672) 2022-04-20 05:45:57 -07:00
BUILD.bazel build: migrate more usages from @bazel/typescript to @bazel/concatjs (#45431) 2022-03-25 12:18:34 -07:00
esbuild.config.js refactor: setup bundling for @angular/compiler-cli package (#43431) 2021-10-01 18:28:42 +00:00
import_meta_url.d.ts refactor(compiler-cli): do not use __filename or __dirname global for ESM compatibility (#43431) 2021-10-01 18:28:45 +00:00
index.ts build: switch all instances from ng_rollup_bundle to app_bundle (#44490) 2022-01-04 12:14:14 -08:00
package.json feat(core): drop support for TypeScript 4.4 and 4.5 (#45394) 2022-03-24 10:51:47 -07:00
tsconfig-build.json refactor(compiler-cli): dismantle View Engine implementation of ngc (#44269) 2021-12-01 10:36:30 -08:00
tsconfig.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00