microsoft / microsoft/TypeScript
`ReadonlyMap` lacks documentation for `forEach`, `get`, `has` and `size`
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ả
⚙ Compilation target
ES2015+
⚙ Library
lib.es2015.collection.d.ts
Missing / Incorrect Definition
ReadonlyMap<K, V> lacks documentation for forEach, get, has and size.
Hovering these members in an editor shows no description, unlike the corresponding members of Map<K, V>. The documentation should ideally be copied from regular Map<K, V> for consistency, exactly as was done for ReadonlySet<T> in #63481 (fixed by #63483).
Note: the ReadonlyMap members declared in lib.es2015.iterable.d.ts (entries, keys, values and [Symbol.iterator]) are already documented; only the four members declared in lib.es2015.collection.d.ts lack documentation.
Sample Code
declare const m: ReadonlyMap<string, number>;
// Hover any of these: no documentation is shown
m.get("a");
m.has("a");
m.size;
m.forEach(v => console.log(v));
Documentation Link
No response
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
Mở lib.es2015.collection.d.ts và so sánh các member được ghi tài liệu của Map<K, V> với forEach, get, has và size trên ReadonlyMap<K, V>. Kiểm tra tính nhất quán của thay đổi tài liệu ReadonlySet từ #63481/#63483. Hoàn tất nghĩa là editor hover hiển thị mô tả cho cả bốn member của ReadonlyMap, khớp với tài liệu tương ứng của Map.
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
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 90/100