microsoft / microsoft/TypeScript
Show all JSDoc @typedef properties when forming object of that type
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Issue Type: Feature Request
Problem
When making references to custom types, you cannot really see what that custom type actually is actually composed of.For example, I have a class called OnlineUser which takes an optional parameter of custom type OnlineUserOptions:

When hovering over a reference to the class or forming the object to pass as OnlineUserOptions, only the name of the type is shown in the documentation that is displayed. If you don't know/remember what properties comprise OnlineUserOptions, then the only way to find out is by beginning to type random characters:

Suggestion
It would be very useful if instead, as soon as you begin the object literal, it would show all the properties of the custom type, like so:
It would also be nice if it was possible to click on the name of the type to jump to its definition (maybe through use of the @link tag?) or hover over it to view its details as though you were hovering over its name in the actual @typedef.
VS Code version: Code 1.50.0 (93c2f0fbf16c5a4b10e4d5f89737d9c2c25488a3, 2020-10-07T06:10:52.432Z)
OS version: Windows_NT x64 10.0.19041
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior in VS Code using a JSDoc @typedef such as OnlineUserOptions and an object literal passed to that type. Inspect the TypeScript language-service completion and documentation behavior involved; done means all typedef properties appear when forming the object and the type can provide useful navigation or hover details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100