Microsoft/TypeScript

@typedef tags appearing in the next declaration quick info in VSCode

Open

#25.303 geöffnet am 28. Juni 2018

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (6.726 Forks)batch import
BugDomain: JSDocHelp Wanted

Repository-Metriken

Stars
 (48.455 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (9 gemergte PRs in 30 T)

Beschreibung

TypeScript Version: 2.9.2 / 3.0.0-dev.20180628

Search Terms: jsdoc esdoc typedef vscode quick info function variable next description

I am experiencing an issue in Visual Studio Code where @typedef tags in .js files all get added to the next declaration, whether it be a function, a variable etc. I searched the wiki and the issues about it and found closed issues that experienced the same bug. VSCode was running TypeScript version 2.9.2. I also replicated the bug by upgrading to the latest preview version. It seems this issue was resolved long ago and I can't understand why I am still experiencing it. Here is some familiar code from issue #12233 :

Code

/**
 * @typedef {Object} MyType1
 * @prop {string} name
 * @prop {string} type
 */

/**
 * @typedef {Object} MyType2
 * @prop {string} name
 * @prop {string} type
 */

/**
 * @param {MyType1} param1 MyParamPype
 * @returns {boolean}
 */
function MyFunc1 (param1) {

}

/**
 * @param {MyType2} param2 MyParamPype
 * @returns {boolean}
 */
function MyFunc2 (param1) {

}

Expected behavior: The quick info window when hovering MyFunc1should only show

@param {MyType1} param1 MyParamPype
@returns

Actual behavior: image image

Related Issues: #12233 #12004

Contributor Guide