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

Add flag to mark TS Server unused variable suggestion diagnostics #23288

Closed
mjbvz opened this issue Apr 9, 2018 · 2 comments
Closed

Add flag to mark TS Server unused variable suggestion diagnostics #23288

mjbvz opened this issue Apr 9, 2018 · 2 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Apr 9, 2018

TypeScript Version: 2.9.0-dev.20180409

Search Terms:

  • suggestion diagnostics
  • no unused
  • tsserver

Request
Follow up on #22361. Just tried it out in VS Code. Very cool to see this working but we will need a new a flag on suggestion diagnostic objects that identifies them as being diagnostics for unused variables. I don't currently see any flags being returned by tsserver

@ghost
Copy link

ghost commented Apr 9, 2018

We did add a reportsUnnecessary property to the diagnostic object.

@mjbvz
Copy link
Contributor Author

mjbvz commented Apr 9, 2018

Ok, is it possible that this property is not being sent through the tsserver? Here's what I see for an unused diagnostic on the 2.9.0-dev.20180409 insiders build:

    "diagnostics": [
        {
            "start": {
                "line": 3,
                "offset": 7
            },
            "end": {
                "line": 3,
                "offset": 8
            },
            "text": "'a' is declared but its value is never read.",
            "code": 6133,
            "category": "suggestion"
        }
    ]

@ghost ghost closed this as completed in #23293 Apr 10, 2018
@mhegazy mhegazy added Bug A bug in TypeScript Fixed A PR has been merged for this issue labels Apr 10, 2018
@mhegazy mhegazy added this to the TypeScript 2.9 milestone Apr 10, 2018
@mhegazy mhegazy assigned ghost Apr 10, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants