angular/packages/compiler-cli
JoostK a6849f27af fix(compiler-cli): evaluate const tuple types statically (#48091)
For standalone components it may be beneficial to group multiple declarations
into a single array, that can then be imported all at once in `Component.imports`.
If this array is declared within a library, however, would the AOT compiler
need to extract the contents of the array from the declaration file. This
requires that the array is constructed using an `as const` cast, which results
in a readonly tuple declaration in the generated .d.ts file of the library:

```ts
export declare const DECLARATIONS: readonly [typeof StandaloneDir];
```

The partial evaluator logic did not support this syntax, so this pattern was
not functional when a library is involved. This commit adds the necessary
logic in the static interpreter to evaluate this type at compile time.

Closes #48089

PR Close #48091
2022-12-07 14:10:26 -08:00
..
integrationtest refactor(compiler-cli): remove enableIvy options (#47346) 2022-09-06 11:33:48 -07:00
linker feat(core): support TypeScript 4.9 (#48005) 2022-12-06 10:45:33 -08:00
ngcc refactor(compiler): replace deprecated sourcemap-codec (#48387) 2022-12-07 14:09:17 -08:00
private refactor(localize): update version of Babel (#44931) 2022-02-24 21:42:54 +00:00
src fix(compiler-cli): evaluate const tuple types statically (#48091) 2022-12-07 14:10:26 -08:00
test fix(compiler-cli): evaluate const tuple types statically (#48091) 2022-12-07 14:10:26 -08:00
BUILD.bazel refactor(compiler): replace deprecated sourcemap-codec (#48387) 2022-12-07 14:09:17 -08: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 refactor(compiler): replace deprecated sourcemap-codec (#48387) 2022-12-07 14:09:17 -08: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