microsoft / microsoft/TypeScript
Show all JSDoc @typedef properties when forming object of that type
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.3k
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 132
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện hành vi trong VS Code bằng cách sử dụng một JSDoc @typedef chẳng hạn như OnlineUserOptions và một object literal được truyền cho kiểu đó. Kiểm tra hành vi hoàn thành và tài liệu của TypeScript language-service có liên quan; được xem là hoàn thành khi tất cả các thuộc tính typedef xuất hiện trong lúc tạo object và kiểu có thể cung cấp các chi tiết điều hướng hoặc hover hữu ích.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, typescript
- Lĩnh vực
- developer-experience, tooling
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100