microsoft / microsoft/TypeScript
Typedef of object with generic property fails since 5.1
Đang mở
@sandersn đang làm issue này rồi.
Từ ngày 12/6/2023.
Needs Investigation
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.4k
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 117
Mô tả
Bug Report
🔎 Search Terms
generic typedef object
🕗 Version & Regression Information
- This changed between versions 5.0.4 and 5.1.3
⏯ Playground Link
Playground link with relevant code
💻 Code
/**
* @typedef {Object} O
* @property {Array<T>} a Array of T
* @template T
*/
🙁 Actual behavior
Templated properties produce an error since upgrading TS to 5.1.3
🙂 Expected behavior
Generic properties should work as in 5.0.4
This still works, but it should be functionally equivalent to the typedef above. Though the syntax with @property is preferable as each property can be documented with a description.
/**
* @typedef {{a: Array<T>}} O
* @template T
*/
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.
Đánh giá
Issue này chưa được đánh giá.