Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript syntax highlighting breaks after multi line crocodile bracket type assertion #983

Open
MrSimmmons opened this issue Jun 7, 2023 · 0 comments

Comments

@MrSimmmons
Copy link

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:

  1. 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.
Screenshot 2023-06-07 at 5 14 54 PM

Here is a second screenshot with different theme added. You can see it breaks in the same spot.
Screenshot 2023-06-07 at 5 15 38 PM

@mjbvz mjbvz transferred this issue from microsoft/vscode Jun 7, 2023
@mjbvz mjbvz removed their assignment Jun 7, 2023
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

No branches or pull requests

2 participants