microsoft / microsoft/TypeScript
Intellisense behaviour of functions and parameters
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ả
Some odd/unintuitive Intellisense behaviour:
/**
* Function description A
* @param name Parameter description A
*/
function uniqueName(name: string): string {
}
export const Uid = {
/**
* Function description B
* @param name Parameter description B
*/
uniqueName
};
The intellisense description for the 'Uid.uniqueName' property is now description B, however the intellisense for the parameter is description A. There isn't anything overriding here - the description of the function is always taken from the export, and the parameter description is always taken from the function definition. As such, I need to do the following to get full intellisense support for this pattern:
/**
* @param name Parameter description
*/
function uniqueName(name: string): string {
}
export const Uid = {
/**
* Function description
*/
uniqueName
};
i.e. function definitions in one place, parameter definitions in another place. I know I can work around this by restructuring the code, but it still feels like I should be able to achieve it in the above format.
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
Không có tệp mã nguồn hay bài kiểm thử nào được nêu. Hãy tái hiện các ví dụ TypeScript IntelliSense trong issue và theo dõi cách tài liệu của thuộc tính được export và tham số hàm được chọn; được xem là hoàn tất khi cả mô tả hàm được tài liệu hóa và mô tả tham số đều xuất phát từ các khai báo mong đợi mà không tái cấu trúc mã.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- compilers
- Loại issue
- Lỗi
- Độ 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
- 25/100