Skip to content

Typescript: incorrect syntax highlighting #264328

@gameroman

Description

@gameroman

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

  • VS Code Version:
    Version: 1.103.2 (user setup)
    Commit: 6f17636
    Date: 2025-08-20T16:45:34.255Z (1 wk ago)
    Electron: 37.2.3
    ElectronBuildId: 12035395
    Chromium: 138.0.7204.100
    Node.js: 22.17.0
    V8: 13.8.500258-electron.0
    OS: Windows_NT x64 10.0.19045

  • OS Version:
    OS Name: Microsoft Windows 10 Pro
    OS Version: 10.0.19045 N/A Build 19045

Steps to Reproduce:

Image
// Syntax hilighting is INCORRECT ❌
const a = async (params?: {
  arg?: string | number;
  arg2?: string | number;
  arg3?: string | number;
}) => {
  return params;
};

// Syntax hilighting is CORRECT ✅
const b = async (params: {
  arg?: string | number;
  arg2?: string | number;
  arg3?: string | number;
}) => {
  return params;
};

// Syntax hilighting is CORRECT ✅
const c = async (params?: { arg?: string | number }) => {
  return params;
};

// Syntax hilighting is CORRECT ✅
const d = async (params: { arg?: string | number }) => {
  return params;
};

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions