microsoft / microsoft/TypeScript

TypeScript: JSDoc tooltips are shared between types and values, but not functions

Đang mở
#43,889 10 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Experience Enhancement Suggestion
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ả

TS Template added by @mjbvz

TypeScript Version: 4.2.4

Search Terms

  • quickinfo
  • jsdoc

Issue Type: Bug

Steps to reproduce

  • Create a TypeScript file.
  • Create a type alias with some name, and write a JSDoc comment for it.
  • For types and functions:
    • Create a function with the same name, write a different JSDoc comment.
    • Hover over the type name. You will see the function’s comment, followed by the type’s comment.
    • Hover over the function. You will only see the function’s comment.
  • For types and values:
    • Create a value identifier with the same name, write a different JSDoc comment.
    • Hover over the type name. You will see the type’s comment, followed by the value’s comment.
    • Hover over the value identifier. You will see the type’s comment, followed by the value’s comment.

Reference file

/** A */
type X = null
/** B */
let X = null
/** C */
type Y = null
/** D */
function Y() {}
Screenshots

vscode-jsdoc-issue-type-x
vscode-jsdoc-issue-let-x
vscode-jsdoc-issue-type-y
vscode-jsdoc-issue-function-y

System and version info

VS Code version: Code - Insiders 1.56.0-insider (0123d26aaa393bccf99f31f1eac07df6c9e218ce, 2021-04-29T05:12:38.091Z)
OS version: Linux x64 5.11.0-7614-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz (8 x 2300)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 7.64GB (0.18GB free)
Process Argv --no-sandbox --unity-launch --crash-reporter-id dbbd25fe-3f4e-426a-9c89-45e060834124
Screen Reader no
VM 0%
DESKTOP_SESSION pop
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP pop
XDG_SESSION_TYPE x11
Extensions: none

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái tạo tệp TypeScript tham chiếu và so sánh kết quả quickinfo cho cặp kiểu/giá trị với cặp kiểu/hàm. Truy vết quá trình xử lý quickinfo và JSDoc liên quan đến các hover đó, sau đó bổ sung độ bao phủ hồi quy cho các chú thích tooltip dự kiến và xác minh rằng mỗi khai báo hiển thị tài liệu phù hợp.

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ó
3/5
Thời gian dự kiến
1-2 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
50/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.