Typescript syntax highlighting breaks after multi line crocodile bracket type assertion
MrSimmmons opened this issue · 0 comments
MrSimmmons commented
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: Version: 1.78.2 (Universal)
- OS Version: macOS 13.4
Steps to Reproduce:
- past the following code into a file which has TypeScript set as the language
const req: { query: Record<string, unknown> } = { query: {id1: 'foo', id: 'bar'} };
const { id1, id2 } = <
{
id1: string;
id2: string;
}
>req.query;
if (id1) {
throw new Error('syntax highlighting broke');
}
const backToNormal = 'yay';
if (id2) {
throw new Error('syntax highlighting is back');
}
Screenshot was taken on an instance with all extensions disabled.
Notice how the highlighting breaks after the req.query
for the following if statement and its contents.
Here is a second screenshot with different theme added. You can see it breaks in the same spot.