Skip to content

Combination of optional operator and new line breaks syntax higlighting in function arguments #1059

@gameroman

Description

@gameroman

Code

// 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;
};
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions