Signature help shows no JSDoc for a `const` with a function type annotation
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Start with the TypeScript language service code that provides signature help, then trace how it gets JSDoc for a function-typed const declaration. Compare the reported behavior for the declaration without an initializer, the declaration with an initializer, and an arrow function. Reproduce the case in the linked playground and add or update a regression test; done means signature help shows both the function and parameter documentation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🔎 Search Terms
signature, parameter hints, jsdoc, const, type annotation, function type, @param
🕗 Version & Regression Information
- This changed between versions 6.0.3 and 7.0.2 (also in 7.1.0-dev.20261023.1)
⏯ Playground Link
💻 Code
/**
* Adds one to a number.
* @param value The number to add one to.
*/
declare const addOne: (value: number) => number;
addOne(1);
// ^ trigger signature help here
🙁 Actual behavior
Signature help shows addOne(value: number): number with no description and no documentation for value. Hover on addOne does show the JSDoc.
(Type ( in the playground to ensure JSDoc is shown for the parameter in TS 6)
🙂 Expected behavior
Signature help shows "Adds one to a number." and "The number to add one to." for value, like 6.0.3 does.
Additional information about the issue
The same happens with an initializer, like const addOne: (value: number) => number = otherFunction.
(const addOne = (value: number) => value + 1 works: the docs come from the arrow function)
- Ngôn ngữ chính
- Go
- Star
- 112k
- Fork
- 15.4k
- Merge trung bình
- 3 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 136
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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.
Issue khác của microsoft/TypeScript
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoft/TypeScript#65290 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Native API: formatDiagnosticsWithColorAndContext drops related information without a file locationCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/TypeScript#65087 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TS7 LSP: documentHighlight returns nothing when the file path contains '@'Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/TypeScript#64758 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Language server (tsc --lsp) exits with code 1 after `shutdown` and `exit`Có thể đã có người làm @rajnish-verma-22172 đã nhận 13 ngày trước. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
microsoft/TypeScript#64742 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Non-enum CLI options with multiple values separated by comma and space aren't whitespace trimmedCó thể đã có người làm @RyanCavanaugh đã nhận 28 ngày trước. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/TypeScript#64618 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/TypeScript
Issue tương tự
-
area:sampler tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jmbarzee/temporal-architect#302 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
riverqueue/river#1576 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
NFS StorageProvider renders a missing nfsSubDir as "<no value>"Có thể đã có người làm @ldming đã nhận hôm nay. Đang mởkind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apecloud/kubeblocks#11067 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ui bug priority:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
RTX payload type is not found when the RTX fmtp line has rtx-timeCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày