microsoft / microsoft/TypeScript
Hover documentation for parameters documented with jsdoc renders improperly
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ả
### 🔎 Search Terms
parameter hover documentation
jsdoc parameter hyphen
jsdoc parameter
vscode jsdoc parameter hover
### 🕗 Version & Regression Information
~~- This changed between versions ______ and _______~~
~~- This changed in commit or PR _______~~
- This is the behavior in every version I tried, and I reviewed the entire FAQ for anything that might be related to this
- I was unable to test this on prior versions because this is not a regression in typescript itself, it is a VSCode issue which I know, based on experience, will get moved to this repository.
### ⏯ Playground Link
Won't show vscode hover, so not worth pasting.
### 💻 Code
issue 1:
```ts
/**
* Foo method
* @param arg - Documentation for arg
*/
function ex1(arg: string) {
return arg;
}
```
issue 2:
```ts
/**
* Foo method
*
* @param arg Documentation for arg but it ends up being long enough that we
* must split it across lines to stay within max column width
* @param arg2 Documentation for arg but it ends up being long enough that we must split it across lines to stay within max column width
*/
function ex2(arg: string) {
return arg;
}
```
### 🙁 Actual behavior
Issue 1
The hover doc shows a bullet point when the hyphen is present (note the hover for the method itself renders properly)
Issue 2
### 🙂 Expected behavior
Issue 1
In example 1: The hover for `arg` should match what it does when there is no hyphen:
Issue 2:
The description for arg1 should appear exactly as arg2 does.
### Additional information about the issue
Issue #61603 identified the first issue, but framed it as a bug related to not supporting TSDoc. Since jsdoc explicitly mentions the [optional hyphen](https://jsdoc.app/tags-param), this is not an issue specific to TSdoc. TypeScript support in VSCode should render this properly.
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 hai ví dụ TypeScript/JSDoc trong VS Code và kiểm tra đường dẫn kết xuất hover cho tài liệu tham số. So sánh các mô tả có dấu gạch nối và được ngắt dòng; được xem là hoàn tất khi dấu gạch nối tùy chọn không tạo ra mục danh sách ngoài ý muốn và văn bản @param được ngắt dòng được kết xuất giống như mô tả tham số không được ngắt dòng.
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, vscode
- Lĩnh vực
- developer-experience, tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100