-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Description
Problem
For TS, one of our most popular feature requests is showing expanded type information in hovers. For example, with the code:
type FooType = string | number
const foo: FooType = 1
Hovering over foo
today shows FooType
. While this is sometimes what you want, other times you'd like to see the type expanded to string | number
instead
While we could add a global setting for expanding types in hovers, this isn't a great solution as sometimes the expanded type is very confusing. Really we want to provide both the simplified and expanded hover info and make it easy to switch between them
Feature Request
Add new UI and apis that users to request a more detailed version of a hover. The user action for this could be:
- A keyboard shortcut that expands the currently showing hover hover when pressed
- A button in the hover the lets you toggle between different levels of detail
We believe that other languages besides typescript could use this functionality as well. @jakebailey brought up Python for example but C++, c#, and any other languages with complex types could likely benefit