You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Matt Bierner (@mjbvz) maybe we need a way for ppl to "expand" a type alias declaration in the quick info.. are there any experiences like that in VSCode that we can model after?
Yes, I think I misunderstood this specific issue but having a way to expand types dynamically in hover would be very helpful. We have no concept of this in VS Code currently. Visual Studio might though
However, there is no way to provide a description of a property for auto-complete hints
Therefore, the quickest solution before providing expansion of types is to allow writing JSDoc where a type is specified both with {{ ... }} to allow for expanded properties in preview, and has @prop for description of properties in the auto-complete.
/** * @typedef {{ status: Status, m(n: number): void }} DoneStatus * @prop {Status} status The status * @typedef {{ hello: 'world'}} Status */
Wesley Wigham (@weswigham) I don't think that your change from here which is the point of this topic will be reverted, but is it possible to at least implement the suggestion in the post above ^? thanks.
zavr-1 That PR brought JSDoc into the same style of printout that we used for TS, but the core issue is that when a type is aliased within quickinfo, there's no way to inspect what's "inside the alias" right at that point, as it were. Hence Mohamed Hegazy (@mhegazy) and Matt Bierner (@mjbvz) 's remarks on new UI to enable that in vscode/VS. We've talked about it in the past - it seems generally useful for inspecting large type hierarchies.
What I'm saying OK fine I get the point of aliases for large type hierarchies, but could you not allow me to write {{ prop: TypeB }}AND define a property under @typedef so it's visible in the preview? Because then it's best of both worlds -- I can define a type to be shown as an alias only, or I can define it as expanded one. Currently, I can do these both things, but I can't describe a property for preview if I use {{ prop: TypeB }} notation.
At the moment, it's either:
Forcing nested properties, but no description in auto-complete
/** * @typedef {{ prop: TypeB }} TypeA * @prop {TypeB} prop A test Prop * @typedef {string} TypeB */
Type alias, with description in auto-complete
/** * @typedef {Object} TypeA * @prop {TypeB} prop A test Prop * @typedef {string} TypeB */
Hi, I created a similar issue that was closed for duplicate. (#41096 )
Here the last comment is from 2 years ago and there is another related task (#38040)
I'd like a quick update on where we are with this.
Reacted by Lo Axhamre, Aaron Cowie, Than Hutchins, cakesoft-raghav, Alexander Tesfamichael, Jesse Hoogland, jordanwilking, Benedikt Hopfinger, Peter Ingulli, rustamd and 12 more
I'd love to see this happen as internal typedefs are usually quite important in terms of their structure. A quick set of ideas to please both people who need it and people who prefer the simplified view:
Have an option in the settings to select behavior
Have a link-like button in the hint popup "Expand types"/"Collapse types"
Allow clicking on the type name to expand it or bring its own pop-up
In relation to this, recently we have merged into VS Code a proposed API for expanding and contracting hovers (see PR here microsoft/vscode#210472), so if the TypeScript server adopts quick info expansion, we could implement this in VS Code too.
Reacted by leokun, no, snarbies, Arkellys, Guillaume Humbert, Géraud Henrion, Tommi Finnilä, Gary Gozlan, msfe-copilot3, Ron Saksonov and 9 more
Activity
mjbvz commentedon Jul 18, 2018
zavr-1 do you see the PARAM properties if you scroll the hover?
mhegazy commentedon Jul 18, 2018
Matt Bierner (@mjbvz) maybe we need a way for ppl to "expand" a type alias declaration in the quick info.. are there any experiences like that in VSCode that we can model after?
mjbvz commentedon Jul 18, 2018
Yes, I think I misunderstood this specific issue but having a way to expand types dynamically in hover would be very helpful. We have no concept of this in VS Code currently. Visual Studio might though
mhegazy commentedon Jul 19, 2018
VS does not either. i think eclipse does.
zavr-1 commentedon Jul 20, 2018
Mohamed Hegazy (@mhegazy) Matt Bierner (@mjbvz)
I can achieve this expansion by writing
However, there is no way to provide a description of a property for auto-complete hints
Therefore, the quickest solution before providing expansion of types is to allow writing
JSDocwhere a type is specified both with{{ ... }}to allow for expanded properties in preview, and has@propfor description of properties in the auto-complete.(Note the additional
@propin the typedef).zavr-1 commentedon Jul 20, 2018
Wesley Wigham (@weswigham) I don't think that your change from here which is the point of this topic will be reverted, but is it possible to at least implement the suggestion in the post above ^? thanks.
weswigham commentedon Jul 20, 2018
zavr-1 That PR brought JSDoc into the same style of printout that we used for TS, but the core issue is that when a type is aliased within quickinfo, there's no way to inspect what's "inside the alias" right at that point, as it were. Hence Mohamed Hegazy (@mhegazy) and Matt Bierner (@mjbvz) 's remarks on new UI to enable that in vscode/VS. We've talked about it in the past - it seems generally useful for inspecting large type hierarchies.
zavr-1 commentedon Jul 20, 2018
Wesley Wigham (@weswigham) OK but why is it possible to inspect what's inside using
but not
What I'm saying OK fine I get the point of aliases for large type hierarchies, but could you not allow me to write
{{ prop: TypeB }}AND define a property under@typedefso it's visible in the preview? Because then it's best of both worlds -- I can define a type to be shown as an alias only, or I can define it as expanded one. Currently, I can do these both things, but I can't describe a property for preview if I use{{ prop: TypeB }}notation.At the moment, it's either:
Forcing nested properties, but no description in auto-complete
Type alias, with description in auto-complete
AoDev commentedon Oct 19, 2020
Hi, I created a similar issue that was closed for duplicate. (#41096 )
Here the last comment is from 2 years ago and there is another related task (#38040)
I'd like a quick update on where we are with this.
rgembalik commentedon Jul 21, 2023
I'd love to see this happen as internal typedefs are usually quite important in terms of their structure. A quick set of ideas to please both people who need it and people who prefer the simplified view:
brillout commentedon Oct 6, 2023
Related feature request: #56010.
Mng12345 commentedon Apr 18, 2024
Is there any progress?
aiday-mar commentedon Apr 25, 2024
In relation to this, recently we have merged into VS Code a proposed API for expanding and contracting hovers (see PR here microsoft/vscode#210472), so if the TypeScript server adopts quick info expansion, we could implement this in VS Code too.
0xdevalias commentedon Apr 24, 2025
See also:
skorphil commentedon Sep 19, 2025
Version 1.104. Expandable view doesn't seem to work.
Any updates?
BTW, I see this feature working in github.dev