-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
JS: 'variable' is declared but its value is never read. #51814
Comments
not sure if it's relevant, but Output for Typescript shows:
|
Possible duplicate of microsoft/TypeScript#24963 Please test this in the latest VS Code insiders build to see if it was already fixed |
@mjbvz same issue (the OP, not the TSServer error) |
Thanks. Can you please try upgrading your workspace to use typescript@next by following these instructions: https://code.visualstudio.com/docs/languages/typescript#_using-newer-typescript-versions |
already using typescript@next, I always use it alongside with vscode insiders |
Can you please share a small, complete example project |
I'm having the same problem - anyone find a solution? When I type in the code below cherrio, db, PORT, app all say , 'is declared, but value is never read'. const express = require("express"); //Our scraping tools //Require all models const PORT = 3000; // Initialize Express // Configure middleware // request for logging requests |
@writesandy Please share a complete example. Those variable really not not used anywhere in the current example @ManyouRisms Do you access |
After injecting it I assign it directly to a private _apiUrl which I then use throughout the code. That in itself I would assume would classify as 'being used', because if i was to remove the declaration of apiUrl all together, the build would break because it is indeed getting used in the constructor. |
@ManyouRisms with |
Closing as we do not have enough information to investigate the original issue Please open new issues for other problems around unused variables |
Version: 1.25.0-insider
Commit: 583f1e4
Date: 2018-06-13T05:18:10.709Z
Electron: 2.0.2
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
Seems like a regression, the editor can't decide if passing the variable to a function counts as "read" it seems
Steps to Reproduce:
express middleware in this example
const something = (req, res, next) => { next() }
app.use(something)
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: