GNU bug report logs - #63810
29.0.91; typescript-ts-mode grammar missing the "is" keyword

Previous Next

Package: emacs;

Reported by: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>

Date: Wed, 31 May 2023 07:31:02 UTC

Severity: normal

Found in version 29.0.91

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 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)




This bug report was last modified 1 year and 355 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.