Microsoft/TypeScript

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

Open

#25 303 ouverte le 28 juin 2018

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)TypeScript (6 726 forks)batch import
BugDomain: JSDocHelp Wanted

Métriques du dépôt

Stars
 (48 455 stars)
Métriques de merge PR
 (Merge moyen 6j 17h) (9 PRs mergées en 30 j)

Description

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

Guide contributeur