Skip to content

TypeScript - Highlighting : Keywords treated as keywords when followed by alphabetic character #3000

@oedotme

Description

@oedotme

Information

  • Language: TypeScript
  • Plugins: None
  • Version: 1.24.0

Description

Some TypeScript keywords such as infer and type are treated as keywords when followed by alphabetic character.

Expected highlighting :

import { infer, inference, infer } from 'module'
//              ~~~~~ ✅

import { type, typeDefs, type } from 'module'
//             ~~~~ ✅

import { const, constants, const } from 'module'
//              ~~~~~ ✅

Actual highlighting :

image

Code snippet

Test page

The code being highlighted incorrectly.
import { infer, inference, infer } from 'module'
//              ~~~~~ ❌

import { type, typeDefs, type } from 'module'
//             ~~~~ ❌

import { const, constants, const } from 'module'
//              ~~~~~ ✅

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions