microsoft / microsoft/TypeScript

JSDoc property description containing "@" character seems to make everything below this as undefined

Đang mở
#39,976 2 bình luận 1 reaction 1 người được giao Xem trên GitHub

@orta đang làm issue này rồi.

Từ ngày 3/11/2020.

Bug Domain: JSDoc
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ả

This is an issue with TS typings declarations generated from JSDoc and code analysis

TypeScript Version: 3.8.3

Search Terms: jsdoc property at @ description link markdown

Code

/**
 * @typedef SomeTypeDef
 * @property {string} property1
 *   I'm a comment with an [@s](link)
 * @property {boolean} propertyCantBeAccessed
 */

/**
 * @param {SomeTypeDef} s
 */
const f = (s) => {
    s.propertyCantBeAccessed
}

f({
    property1: 'only exists here',
    propertyCantBeAccessed: false
})

Expected behavior:
The property exists and can be accessed

Actual behavior:
Code fails with Property 'propertyCantBeAccessed' does not exist on type 'SomeTypeDef'

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.

Đánh giá

Issue này chưa được đánh giá.

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.