mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The `read` option for queries can rely on lexical variables inside the class. These constructs are fine from a technical perspective in TypeScript, but in practice, when the component/directive definition is being created, the read value is extracted into the definition, **outside** of the class. This breaks `this` references. To fix this, we are restricting the `read` option to literal values. Similar to `descendants`. Literal references are in practice constructs like: - `read: bla.X` - `read: X` where `bla` or `X` is never a `ThisKeywoord`- hence fixing the issue and also simplifying the patterns for easier single file compilation. PR Close #54257 |
||
|---|---|---|
| .. | ||
| bin | ||
| ngtsc | ||
| transformers | ||
| extract_i18n.ts | ||
| main.ts | ||
| perform_compile.ts | ||
| perform_watch.ts | ||
| typescript_support.ts | ||
| version.ts | ||
| version_helpers.ts | ||