简体   繁体   English

有没有办法让 VSCode 从他们的评论行中显示有关 JavaScript 函数的附加智能感知信息?

[英]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: Visual Studio Code 在 JavaScript 模块中提供有关 function 的有用悬停信息,如下所示:

在此处输入图像描述

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?有没有办法让它在 function 上方显示注释行,以便显示有关 function 的其他信息,例如如何使用 function 的示例?

在此处输入图像描述

I remember this was possible in NetBeans with PHPDoc, for example.我记得这在 NetBeans 中是可能的,例如,使用 PHPDoc。

Use JS-Doc format.使用 JS-Doc 格式。 Then it should work.然后它应该工作。 https://jsdoc.app/ https://jsdoc.app/

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 javascript 中的 vscode (visual studio) 通过智能感知从一个文件访问定义的函数到另一个文件? - How to access functions defined from one file to other via intellisense with vscode (visual studio) in javascript? 适用于javascript的VSCode intelliSense自动完成功能 - VSCode intelliSense autocomplete for javascript VSCode 中 Javascript 的 Intellisense 不起作用 - Intellisense for Javascript in VSCode not working 我可以在 VSCode 中配置一些东西来为从 importmap 导入的 js 文件获取 javascript 智能感知吗? - Can I configure something in VSCode to get javascript intellisense for a js file that imports from an importmap? 什么是Intellisense告诉我嵌套函数中的JavaScript var scope? - What is Intellisense telling me about JavaScript var scope in nested functions? VSCode中更智能的智能感知-有什么方法摆脱不必要的建议? - Smarter intellisense in VSCode - any way to get rid of unwanted suggestions? 如何让外部库智能感知在 javascript 的 vscode 中工作? - How to get external library intellisense to work in vscode for javascript? 在VSCode中记录用于智能感知的Javascript代码 - Documenting Javascript code in VSCode for Intellisense JavaScript Intellisense VScode [ts()]出现问题 - Problem with JavaScript Intellisense VScode [ts()] JavaScript添加日期函数 - JavaScript Addition Date Functions
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM