Incorrect Javascript syntax highlighting with typeof value and less than (or equal to) operator · Issue #1050 · microsoft/TypeScript-TmLanguage · GitHub
Skip to content

Incorrect Javascript syntax highlighting with typeof value and less than (or equal to) operator #1050

Open

Description

@zedd3v

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.96.2
  • OS Version: macOS 15.3.2 (24D81), Darwin arm64 24.3.0

Steps to Reproduce:

x = typeof y < 'z';
if (x) {
} else {
}

Image

Image

Activity

  1. vs-code-engineering commented on Apr 3, 2025

    @vs-code-engineering

    Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.98.2. Please try upgrading to the latest version and checking whether this issue remains.

    Happy Coding!

  2. RedCMD commented on Apr 15, 2025

    @RedCMD

    partial fix could be to check if a semi colon exists after the open bracket <
    then assume < is operator

  3. removed their assignment
    on Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions