导出后功能的描述是否被删除?
因此,可以说我拥有一个非常好的功能,我想用const导出的功能是:
export const are = {
you: function(){
...
}
}
现在可以说,我添加了一个描述它的作用的颜色:
export const are = {
/**
* This functions does stuff :D
*/
you: function(){
...
}
}
虽然您可以从此脚本中查看描述,但似乎何时它已被导出并重新登录到另一个脚本中,它失去了描述。假设我有这个称为脚本的
import * as run from "run.js"
//and now lets say i call the function
run.are.you()
//when you type .you it just says the default text for a function
脚本
import {are} from "run.js";
are.you()
//when you type .you it still says the default text for a void function
。
So lets say i have this really nice function i want to export with a const are:
export const are = {
you: function(){
...
}
}
And now lets say i added a decription to it that discribes what it does:
export const are = {
/**
* This functions does stuff :D
*/
you: function(){
...
}
}
Whilest you can view the description from this script, it seems as though when it has been exported and reimported into another script it loses its description. Lets say i have this script called script.js:
import * as run from "run.js"
//and now lets say i call the function
run.are.you()
//when you type .you it just says the default text for a function
If you try exporting it seperately like
import {are} from "run.js";
are.you()
//when you type .you it still says the default text for a void function
Just to note I am using Visual Studio Code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论