Typescript: Please consider colourising aliases (Visual Studio)

Created on 23 Apr 2015  路  9Comments  路  Source: microsoft/TypeScript

In the image below, I would like to see bar in var b: bar.Baz to have colour.

image

The alias declaration itself should also be colourised: import bar /*here*/ = foo.bar

Fixed Suggestion Visual Studio

Most helpful comment

Is there any plans at all to implement this? It's very frustrating to work with code that's not properly highlighted...

All 9 comments

@NoelAbrahams i assume you want to have a different class as well for aliases? is that correct?

@mhegazy, did you mean "a different _colour_ as well for aliases"? If so I don't think that would be necessary, because semantically an alias is exactly the same as the type it represents, no?

makes sense.

Another issues here is that the bars in the import bar = foo.bar; statement both should be colorized the same (as a module in this case).

@CyrusNajmabadi this can be related to Quick infor changes for aliases in #3025

It's very actual when using ES6 modules. For example, I have class NormalRandomNumber in common/random-number.ts. So, I use this class in other places like this:

import { NormalRandomNumber } from "./common/random-number";

let myNumber = new NormalRandomNumber(); // Not highlighted as a class!

Because I use ES6 modules for every class (following the standard and SystemJS requirements), none of my classes highlighted as calsses at all. It should be priporitized, thought.

Is there any plans at all to implement this? It's very frustrating to work with code that's not properly highlighted...

I am using TypeScript Intellisense 2.3 and I see that aliases are still not highlighted as types - is there an ETA on this feature?

TypeScript 2.4.2 still have same issues in VS 2015, VS 2017, VS Code. @mhegazy, is there an ETA on this improvement?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fdecampredon picture fdecampredon  路  358Comments

metaweta picture metaweta  路  140Comments

RyanCavanaugh picture RyanCavanaugh  路  205Comments

blakeembrey picture blakeembrey  路  171Comments

xealot picture xealot  路  150Comments