angular/packages/compiler/test/ml_parser
Matthieu Riegler 8bc31a515f feat(core): Allow other expression for exhaustive typechecking
When the switched expression is nested within a union, exhaustive typechecking needs to know which expression to check.
This change adds the possibility of specifying the expression to check:

```
@Component({
  selector: 'app-root',
  imports: [],
  template: `
    @switch (state.mode) {
      @case ('show') { {{ state.menu }}; }
      @case ('hide') {}
      @default never(state);
    }
  `,
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class App {
  state!: { mode: 'hide' } | { mode: 'show'; menu: number };;
}
```

fixes #67406
2026-03-24 14:42:28 -07:00
..
util build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
ast_serializer_spec.ts refactor(compiler): convert scripts within packages/compiler to relative imports (#60625) 2025-04-01 11:57:53 +00:00
ast_spec_utils.ts refactor(compiler): indicate in AST if node is self-closing (#61307) 2025-05-14 11:06:22 +02:00
BUILD.bazel refactor(compiler): remove zone-based testing utilities 2026-02-09 07:55:12 -08:00
html_parser_spec.ts fix(compiler): parse named HTML entities containing digits 2026-03-17 13:54:41 -06:00
html_whitespaces_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
inline_comment_spec.ts feat(compiler): Support comments in html element. 2026-03-19 15:25:17 -07:00
lexer_spec.ts feat(core): Allow other expression for exhaustive typechecking 2026-03-24 14:42:28 -07:00