简体   繁体   中英

Is there a way to get VSCode to display addition intellisense information about JavaScript functions from their comment lines?

Visual Studio Code provides displays useful hover-over information about a function in a JavaScript module, like this:

在此处输入图像描述

Is there a way to get it also display a comment line above the function so that one can have additional information about the function displayed, eg examples of how to use the function?

在此处输入图像描述

I remember this was possible in NetBeans with PHPDoc, for example.

Use JS-Doc format. Then it should work. https://jsdoc.app/

/**
 * Some comment
 */
export const replaceAll = (text: string, search: string, replace: string) => {
    return text.split(search).join(replace);
};

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM