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

TS "function" color is changed when it's not used #50135

Closed
Tyriar opened this issue May 18, 2018 · 12 comments
Closed

TS "function" color is changed when it's not used #50135

Tyriar opened this issue May 18, 2018 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug typescript Typescript support issues verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented May 18, 2018

Seems inconsistent with how variables work:

screen shot 2018-05-18 at 2 42 28 pm

@Tyriar Tyriar added the typescript Typescript support issues label May 18, 2018
@ghost
Copy link

ghost commented May 18, 2018

This is due to microsoft/TypeScript#22388 -- if it's not desired we could revert that.

@Tyriar
Copy link
Member Author

Tyriar commented May 18, 2018

@andy-ms I find it unexpected/distracting personally. This would probably drive me to disable it but I wanted to dogfood for a while longer 😄

@mjbvz
Copy link
Collaborator

mjbvz commented May 18, 2018

@andy-ms Do you know what VS does for C#? Do they grey out just the symbol name:? The entire signature? Entire declaration?

@ghost
Copy link

ghost commented May 18, 2018

@amcasey might know.

@amcasey
Copy link
Member

amcasey commented May 18, 2018

I don't think C# reports it for functions. It's basically at the expression and statement levels.

@amcasey
Copy link
Member

amcasey commented May 18, 2018

image

@amcasey
Copy link
Member

amcasey commented May 18, 2018

The imports are grayed out, the cast is grayed out, and the unused local is squiggled (since it's a warning). Everything else is ignored. Of course, it may be that widely used analyzers report more aggressively.

@amcasey
Copy link
Member

amcasey commented May 18, 2018

My personal preference would be to gray out the keyword (const in the original example) when all of the declared variables are unused. I think @andy-ms may have recently enabled this?

@mjbvz
Copy link
Collaborator

mjbvz commented May 18, 2018

Yes I'd prefer this as well. Makes it more obvious that something is unused

@mjbvz
Copy link
Collaborator

mjbvz commented May 31, 2018

Upstream issues for June: microsoft/TypeScript#24500

We decided to just color the symbol name (except for imports)

@mjbvz mjbvz added this to the June 2018 milestone May 31, 2018
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label May 31, 2018
@ghost
Copy link

ghost commented Jun 1, 2018

Should be fixed by microsoft/TypeScript#24566.

@mjbvz
Copy link
Collaborator

mjbvz commented Jun 12, 2018

Fixed upstream in TS 2.9.2

@mjbvz mjbvz closed this as completed Jun 12, 2018
@roblourens roblourens added the verified Verification succeeded label Jun 28, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug typescript Typescript support issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants