microsoft / vscode-typescript-next

Enables typescript@next as VS Code's built-in TypeScript version
https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next
MIT License
224 stars 41 forks source link

Suggestion #78

Closed Anprotaku closed 1 year ago

Anprotaku commented 1 year ago

I dont really know where to post this suggestion for a feature. (If wrong place please tell me) But a suggestion to show in code whether or not you are copying a value or doing a reference to an object

image Something like the above that show us what type something is without typing it out. I think it would be usefull if we had something similar that shows us if we are copying or referencing a variable. image Something around that assignment to show that obj2 is a reference and not a copy could possibly be helpful?

mjbvz commented 1 year ago

This sounds like a good candidate for an extension. See vscode's InlayHint api for how to contribute these annotations

Anprotaku commented 1 year ago

How would i go about getting references and the context of the code, I can use InlayHint api for displaying information, but how would i go about getting it? Is there some api or something i can use?