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

Fundamental Intellisense Hover Display Requirements: Type Name and Signature #59830

Closed
6 tasks done
JordanHoffman opened this issue Sep 2, 2024 · 5 comments
Closed
6 tasks done
Labels
Duplicate An existing issue was already created

Comments

@JordanHoffman
Copy link

πŸ” Search Terms

IntelliSense

βœ… Viability Checklist

⭐ Suggestion

When I hover over a type, IntelliSense should have the bare minimum ability to display 2 things:

  1. The name of the type
  2. Some sort of signature of the type (I understand if it gets unfeasible for complex/large types, but at least display the starting properties or something!)

How helpful is it to me to hover over a variable and all I see is the name of the type? Sure, a little helpful, but do I know what values are in the type? No. So I have to keep navigating back and forth to the type to see what's in it and back to my code to do whatever I need to do.

It boggles my mind that we have such an intricately fleshed out system for typing, and yet one of the most fundamental purposes of it is barely implemented.

πŸ“ƒ Motivating Example

Before:
I hover over my variable and all I see is this: "MySuperSpecialType"

After:
I hover over my variable and I see: "MySuperSpecialType", followed by the list of its properties and their types. 10x more helpful.

πŸ’» Use Cases

  1. What do you want to use this for?
  • Hovering over types to see BOTH their name and signature
  1. What shortcomings exist with current approaches?
  • doesn't exist in current state
  1. What workarounds are you using in the meantime?
  • Sometimes I make a super weird type to be the return value of another type just so I can see what its values are when I hover, but then I lose the type name when I hover.
@MartinJohns
Copy link
Contributor

Related: #59029

@Oblarg
Copy link

Oblarg commented Sep 2, 2024

Note that interface declarations will never expand, because they're nominal. To get a type to expand, it needs to be declared as a type.

I've found the default expansion behavior taking this into account is pretty decent, and does most of what you ask here. More-detailed control would be nice but I don't see how it'd be ergonomic/sensible without guiding annotations to tel TSC how to expand the types. TypeDoc faces the same issue.

@JordanHoffman
Copy link
Author

Related: #59029

Looks like for now I'll use this extension, which was in one of the stack overflow responses in the related thread. Seems to accomplish exactly what I need.
https://marketplace.visualstudio.com/items?itemName=mxsdev.typescript-explorer&ssr=false#overview

Hopefully at some point you guys can figure out some way to accomplish this. Can't be rocket science.

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Sep 3, 2024
@RyanCavanaugh
Copy link
Member

Is this level of sarcasm / condescension truly necessary? Good grief.

@RyanCavanaugh RyanCavanaugh closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2024
@JordanHoffman
Copy link
Author

Is this level of sarcasm / condescension truly necessary? Good grief.

Im sorry. After looking at this, me being frustrated is no excuse to be rude. Im adding "being more respectful" to my feature request list for self-improvement (for real, no sarcasm intended).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants