Microsoft/TypeScript

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

Open

#25.303 aberto em 28 de jun. de 2018

Ver no GitHub
 (3 comments) (0 reactions) (0 assignees)TypeScript (6.726 forks)batch import
BugDomain: JSDocHelp Wanted

Métricas do repositório

Stars
 (48.455 stars)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (9 fundiu PRs em 30d)

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

Guia do colaborador