angular/packages/compiler-cli/src
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
..
bin test: update dynamic-compiler test to be compatible with APF v13 (#43431) 2021-10-01 18:28:46 +00:00
ngtsc fix(compiler-cli): evaluate const tuple types statically (#48091) 2022-12-07 14:10:26 -08:00
transformers refactor(compiler-cli): update emit signature to support for strongly typed emitCallback (#47893) 2022-11-01 04:44:28 -07:00
extract_i18n.ts refactor(compiler-cli): remove dependency on minimist (#43644) 2021-10-04 17:31:03 -07:00
main.ts refactor(compiler-cli): update emit signature to support for strongly typed emitCallback (#47893) 2022-11-01 04:44:28 -07:00
perform_compile.ts refactor(compiler-cli): update emit signature to support for strongly typed emitCallback (#47893) 2022-11-01 04:44:28 -07:00
perform_watch.ts refactor(compiler-cli): update emit signature to support for strongly typed emitCallback (#47893) 2022-11-01 04:44:28 -07:00
typescript_support.ts feat(core): support TypeScript 4.9 (#48005) 2022-12-06 10:45:33 -08:00
version.ts docs: fix package name in version.ts files in different packages (#41208) 2021-05-10 10:26:34 -04:00
version_helpers.ts refactor(compiler-cli): move version number helpers out of diagnostics subfolder (#44269) 2021-12-01 10:36:30 -08:00