Vscode: Syntax highlight issue in .tsx files using generics

Created on 23 Jun 2016  路  18Comments  路  Source: microsoft/vscode

  • VSCode Version: Code - Insiders 1.3.0-insider (5eaf9f05038b0a9818ebff510e1aafe07ac1ae68, 2016-06-23T05:07:59.360Z)
  • OS Version: Windows_NT ia32 10.0.10586

Steps to Reproduce:

  1. Create new .tsx file
  2. Paste following
let a = Array<number>();   // Highlight ok here

interface egGenericsInArray {
   a: Array<number>;   // Highlight fails here with generics
}
let s = "anything fails here...";

vscode sh bug

Syntax highlight breaks after Array

bug candidate important typescript verified

Most helpful comment

We will have a release with the fix in the coming days.

All 18 comments

Temporary workaround: adding spaces around brackets.

Syntax highlight broken with .tsx files in Visual Studio Code 1.3.0-insider:

interface test {
  a: Array<number>,
  b: string
};

Temporary workaround:

interface test {
  a: Array< number >,
  b: string
};

One can even just make a single space
:)

interface test {
  a: Array< number>,
  b: string
};

Thanks for the workaround!

This is wrecking all kinds of havoc on our code base highlighting in the 1.3.0 release. Can a fix please be prioritized?

Issue is also in today (8th July 2016) release of 1.3 version!

This issue broken whole project based on typescript! Please make it priority fix no 1 !

@aeschli @dbaeumer Forward this to TypeScript if that's the case.

@mbilling Even when space within Array is workaround it is not suitable for project with 200+ ts files where at least half of them has Array. So weird that this issue was reported 15 days ago and was not fixed into final release of 1.3.

Reverting back 1.2...

I reverted tsx to the version we had in 1.2. ts and js still have the changes for https://github.com/Microsoft/TypeScript-TmLanguage/pull/19 which seems to work well.

Awesome!

How can I get the version that contains the patch? When will it be shipped?

Thanks!

Install insiders version of vscode. Latest update from this morning includes the patch
https://code.visualstudio.com/insiders

@mbilling Do you release "fix" release as public for this same as was for 1.2.1 version? I think its breaking critical bug to be able to use public 1.3 release without this fix!

Agree. I'm just not in the release chain. I only raised the issue.
I guess someone is on it - or i hope :-)

We will have a release with the fix in the coming days.

@aeschli I am still having this issue. I think we should re-open it:

img

Version info:

Version 1.5.2
Commit 66f37fd2a99eb9d628dd374d81d78835b410c39b
Date 2016-09-12T13:22:54.636Z
Shell 0.37.6
Renderer 49.0.2623.75
Node 5.10.0

This is what I see:

image

1.6.0-insider
0619ede1e469ed23fbb214eaa0377625a402ca87

Seems to be fixed in latest Insiders.

screen shot 2016-09-25 at 4 42 01 pm

screen shot 2016-09-25 at 4 41 40 pm

ping @aeschli

Broken for me in a .tsx file.

Version 1.9.0-insider (1.9.0-insider)

f2379e882b415e2c503a723776c4431a40d7c1aa

2017-01-02T07:03:01.993Z

screen shot 2017-01-02 at 10 41 35 pm
screen shot 2017-01-02 at 10 41 41 pm

Adding spaces before, after, and during the angle brackets does not work around it for me.

Removing the space between the component and the angle bracket works around it!

screen shot 2017-01-03 at 10 09 12 am

Was this page helpful?
0 / 5 - 0 ratings