You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[VS2015]Imported class missing from completions in JSX body in extends expression #4577
To clarify, it is not colorized correctly, it is colorized as if the code is not JSX text. In reality, that should be treated like a string literal.
Visual Studio won't correctly classify this until we have the syntactic classifier back. This honestly might not be too bad to fix in the TextMate grammar though.
My issue (#6931) has been classified as a duplicate of this one, but this looks to me like and old corner case bug while in my experience the problem is quite massive.
In tsx, when using generic types, autocomplete only lets you choose functions. In this case I want to select boolean but only Boolean is shown.
Also as noted here imported components don't work when creating JSX tags. You don't need esoteric inheritance with if statements to reproduce it like in the initial example, any JSX tag reproduces this bug.
This means the experience using libraries like react-bootstrap, react-widgets or writing any non-trivial app with imported components gets downgraded.
Activity
mhegazy commentedon Sep 1, 2015
i find the colorization of
if (true)annoyingly wrong as well.weswigham commentedon Sep 1, 2015
Isn't it colorized correctly?
mhegazy commentedon Sep 3, 2015
well.. lexically yes. but it should not have been.. we need to add a new context for being in a jsx element..
danquirk commentedon Sep 3, 2015
Why wouldn't you want your TypeScript code colorized just because it's in a JSX block?
DanielRosenwasser commentedon Sep 3, 2015
To clarify, it is not colorized correctly, it is colorized as if the code is not JSX text. In reality, that should be treated like a string literal.
Visual Studio won't correctly classify this until we have the syntactic classifier back. This honestly might not be too bad to fix in the TextMate grammar though.
olmobrutall commentedon Feb 6, 2016
Hi guys,
My issue (#6931) has been classified as a duplicate of this one, but this looks to me like and old corner case bug while in my experience the problem is quite massive.
In tsx, when using generic types, autocomplete only lets you choose functions. In this case I want to select
booleanbut onlyBooleanis shown.Also as noted here imported components don't work when creating JSX tags. You don't need esoteric inheritance with if statements to reproduce it like in the initial example, any JSX tag reproduces this bug.
This means the experience using libraries like react-bootstrap, react-widgets or writing any non-trivial app with imported components gets downgraded.
Maybe this should be included in 1.8.2?
Thanks for you work!
Show aliases (e.g. imports) in JSX tag completion positions
RyanCavanaugh commentedon Mar 1, 2016
Fix pending @ #7326