angular/packages/compiler-cli/test/ngtsc
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
..
BUILD.bazel refactor(compiler): Add a new helper method getPrimaryAngularDecorator. (#47180) 2022-08-22 10:39:42 -07:00
component_indexing_spec.ts refactor(compiler-cli): update to use new file-system interfaces (#40281) 2021-01-08 09:34:44 -08:00
env.ts refactor(compiler-cli): remove enableIvy options (#47346) 2022-09-06 11:33:48 -07:00
extended_template_diagnostics_spec.ts refactor(compiler-cli): remove leftover _extendedTemplateDiagnostics flag (#44920) 2022-02-01 18:24:10 +00:00
host_directives_spec.ts fix(compiler-cli): Produce diagnostic rather than crash when using invalid hostDirective (#48314) 2022-12-01 13:43:30 -08:00
imports_spec.ts refactor(compiler-cli): improve DX for reference emit failures (#44587) 2022-01-06 23:44:24 +00:00
incremental_error_spec.ts perf(compiler-cli): detect semantic changes and their effect on an incremental rebuild (#40947) 2021-03-08 08:41:19 -08:00
incremental_semantic_changes_spec.ts refactor(compiler-cli): Adjust generated TCB when checkTypeOfPipes is false (#40523) 2021-05-06 17:54:14 -04:00
incremental_spec.ts refactor(core): change component emit to 'dependencies' (#45672) 2022-04-20 05:45:56 -07:00
incremental_typecheck_spec.ts refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
ls_typecheck_helpers_spec.ts refactor(compiler): Add getPotentialPipes API method. (#48090) 2022-11-17 11:00:50 -08:00
monorepo_spec.ts test(compiler-cli): move testing utils to separate package (#39594) 2020-11-17 11:59:56 -08:00
ngtsc_spec.ts fix(compiler-cli): accept inheriting the constructor from a class in a library (#48156) 2022-11-23 12:10:37 -08:00
scope_spec.ts feat(compiler-cli): standalone types imported into NgModule scopes (#44973) 2022-03-29 13:06:26 -07:00
sourcemap_utils.ts test: update source-map tests to account for source-map breaking change (#46888) 2022-07-19 09:40:54 -07:00
standalone_spec.ts fix(compiler-cli): evaluate const tuple types statically (#48091) 2022-12-07 14:10:26 -08:00
template_mapping_spec.ts test: update source-map tests to account for source-map breaking change (#46888) 2022-07-19 09:40:54 -07:00
template_typecheck_spec.ts fix(compiler-cli): implement more host directive validations as diagnostics (#47768) 2022-10-17 12:12:22 +02:00
util.ts refactor(compiler): Add a new helper method getPrimaryAngularDecorator. (#47180) 2022-08-22 10:39:42 -07:00
xi18n_spec.ts test(compiler): fix deprecation warning (#45285) 2022-03-07 11:36:47 -08:00