microsoft / microsoft/TypeScript

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

Open
#39,976 2 comments 1 reaction 1 assignee View on GitHub

@orta is already working on this.

Since Nov 3, 2020.

Bug Domain: JSDoc
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

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'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.