Skip to content

JSDoc Property Name with Dash Not Recognized #14395

@mjbvz

Description

@mjbvz

From microsoft/vscode#21592

TypeScript Version: 2.2.1

Code

/**
 * @typedef Product
 * @property {string} title
 * @property {boolean} high-top
 */

/**
 * @type {Product}
 */
const product = null

Expected behavior:
product has a high-top property.

Actual behavior:
product has a high property:

Trace - 12:00:17 PM] Sending request: completions (39). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "/Users/matb/projects/sand/bar.js",
    "line": 12,
    "offset": 9
}
[Trace - 12:00:17 PM] Response received: completions (39). Request took 16 ms. Success: true 
Result: [
    {
        "name": "Product",
        "kind": "warning",
        "kindModifiers": "",
        "sortText": "1"
    },
    {
        "name": "high",
        "kind": "property",
        "kindModifiers": "",
        "sortText": "0"
    },
    {
        "name": "product",
        "kind": "warning",
        "kindModifiers": "",
        "sortText": "1"
    },
    {
        "name": "title",
        "kind": "property",
        "kindModifiers": "",
        "sortText": "0"
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do thisVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions