microsoft / microsoft/TypeScript
Variable "name" in VSCode editor(intelli-sense) is showing incorrect information
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TS Template added by @mjbvz
TypeScript Version: 4.0.0-dev.20200708
Search Terms
- javascript
- lib.dom
- globals
- VSCode Version: 1.46.1
- OS Version: Windows 10
Steps to Reproduce:
- Add the following javascript code
var name = "Hi";
console.log(name);
name = "Hello";
console.log(name);
-
Hover over(Mouseover) the variable "name" (in any of the console log statements given above).......picture attached.
-
Expected: During mouse/hover over, variable "name" on the console statement should display "name" as a variable.
Actual: During mouse/hover over, variable "name" on the console statement is showing it as constant. (actually, it's not a constant). Because I'm able to modify the value of the variable "name" from "Hi" to "Hello". This explains "name" is implemented as a variable.
Does this issue occur when all extensions are disabled?: Yes

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named in the report. Start by reproducing the hover behavior with the provided JavaScript snippet in VS Code using the listed versions, then trace the TypeScript IntelliSense path responsible for the displayed symbol kind. Done means the hover for the reassigned name is identified as a variable rather than a constant.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100