bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63810: 29.0.91; typescript-ts-mode grammar missing the "is" keyword


From: Jimmy Yuen Ho Wong
Subject: bug#63810: 29.0.91; typescript-ts-mode grammar missing the "is" keyword
Date: Wed, 31 May 2023 08:30:14 +0100

Reproduction:

1. C-x C-f test.ts
2. Insert
   ```typescript
   function isFish(pet: Fish | Bird): pet is Fish {
     return (pet as Fish).swim !== undefined;
   }
   ```
3. Observe the `is` keyword isn't highlighted.

Expectation:

TypeScript has a concept called type predicates, which introduces a
keyword called `is`.


[Reference](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]