-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Intellisense shows full internals of a type declaration but not of an interface declaration on hover #32616
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
Comments
Related to #25784? Right now there is no way to selectively expand/collapse parts of a type definition. If we could do this, then it would make sense to do this for interfaces as well as type aliases (with perhaps interfaces collapsed by default and type aliases expanded by default). Also, an actual playground link |
This is one of the differences between aliases and interfaces. Interactive expansion would definitely be nice; see the above linked issue |
Thanks for the fast feedback and the playground link!
Yes, but #25784 is more specific since it addresses collapsing. I just want to get the same info from an interface I get from type on hover. I am still on the fence re TS. Yes it helps and there is a lot of good stuff but there are also some subpar things. If I already make the work, declare type/interfaces for all my code I want to be able to see their definition anywhere easily. Having to go to the definition of interfaces to get the interface is not that much better than just going to a plain JS object and checking briefly its signature or its JSDoc. And there's actually no reason to treat interface differently than type. Btw, a JSDoc would have been showed on hover. So, I'd be happy to see a PR here. Thanks! |
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Related feature request: #56010. |
=> Intellisense won't show any internals of that interface
Do 1, 2 and 3 with a type declaration and Intellisense shows all internals. Discussion on reddit: https://www.reddit.com/r/typescript/comments/cisi08/getting_intellisense_to_show_function_signatures/evejcy0/?context=3
Expected behavior:
Show all internals of any declaration on hover.
Actual behavior:
Just shows internals of type declarations.
Playground Link:
https://codesandbox.io/s/small-bird-l13fg?fontsize=14
Hover with your mouse over
IDuck
andRealDuck
in the respectiveconst
statement.The text was updated successfully, but these errors were encountered: