feat(compiler): Add support for the instanceof binary operator

Because why not ?

fixes #59975
This commit is contained in:
Matthieu Riegler
2026-01-09 06:38:36 +01:00
committed by Jessica Janiuk
parent 9273f1c3c2
commit 72534e2a34
21 changed files with 147 additions and 22 deletions
@@ -68,6 +68,7 @@ Angular supports the following operators from standard JavaScript.
| typeof | `typeof 42` |
| void | `void 1` |
| in | `'model' in car` |
| instanceof | `car instanceof Automobile` |
| Assignment | `a = b` |
| Addition Assignment | `a += b` |
| Subtraction Assignment | `a -= b` |
@@ -100,7 +101,6 @@ NOTE: Optional chaining behaves differently from the standard JavaScript version
| Object destructuring | `const { name } = person` |
| Array destructuring | `const [firstItem] = items` |
| Comma operator | `x = (x++, x)` |
| instanceof | `car instanceof Automobile` |
| new | `new Car()` |
## Lexical context for expressions