Microsoft/TypeScript

Template string literal highlighting breaks on ternary operator with typeof

Open

#42 793 ouverte le 13 févr. 2021

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)TypeScript (6 726 forks)batch import
BugDomain: Something ElseHelp Wanted

Métriques du dépôt

Stars
 (48 455 stars)
Métriques de merge PR
 (Merge moyen 6j 17h) (9 PRs mergées en 30 j)

Description

Bug Report

🔎 Search Terms

template string literal highlighting

🕗 Version & Regression Information

VSCode 1.53.2 + TypeScript 4.1.5

⏯ Playground Link

Workbench Repro

Workbench Repro

💻 Code

function HighlightingWorksFineHere(): void {}
`${0 ? typeof 0 ? 0 : 0 : 0}`;
function ButHereItIsBroken(): void {}
function HighlightingWorksFineHere(): void {}
`${0 ? typeof 0 : 0}`;
function ButHereItIsBroken(): void {}

🙁 Actual behavior

Highlighting breaks after template literal with ternary operator and typeof in VSCode (seems fine in playground though), looks like the closing backtick is not recognized or treated as opening backtick.

1 2

Guide contributeur