Skip to content

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

@pocesar

Description

@pocesar

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'

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions