Skip to content

fix: accept newline type arguments without opening bracket#1072

Open
jeengbe wants to merge 1 commit into
microsoft:masterfrom
jeengbe:je-fix-newline-generic
Open

fix: accept newline type arguments without opening bracket#1072
jeengbe wants to merge 1 commit into
microsoft:masterfrom
jeengbe:je-fix-newline-generic

Conversation

@jeengbe
Copy link
Copy Markdown

@jeengbe jeengbe commented May 15, 2026

Currently, generic type arguments are not highlighted correctly when < appeared at the end of a line with the type identifier on the next line:

fn<
  A>();

The current possiblyMultilineTypeArgument only matches opening brackets, but not an identifier on the following line.

That fix alone caused a regression in clauses such as:

extends Type<
  A
>

(due to expressionWithoutIdentifiers>function-call now accepting it), so the short-circuit above prevents that.

Fixes #876
Fixes #1014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Syntax highlighting: generic type arguments are highly affected by whitespace and other irrelevant context [Bug] Typescript highlight issue

1 participant