[英]Visual Studio javascript intellisense customization
我正在尝试在Visual Studio中的javascript函数中自定义intellisense,而无需对其进行注释。
我尝试过推自己的物品:
但是不幸的是,当尚未在某处初始化toto时,这无效。 但是,如果toto存在:
所以...一个简单的问题,有没有办法使toto完成行为就像已定义的那样? 我错过了一个标志吗?
这是我在事件args“ e”上找到的字段,
我试图更改多个字段值,但似乎没有任何效果。 我正在使用VS2013
好的,我找到了一种在没有参数注释的情况下向功能参数添加智能感知的方法。 如果在智能运行时生命周期中调用了该函数,则它将存储传递给参数的值的类型。 在这里,我用数字5调用我的方法,补全的行为就像toto是Number类型。
此外,我发现了这一点:
来自msdn: http : //msdn.microsoft.com/en-us/library/hh395059.aspx
声明了一个参数,但未在活动文档中的其他位置调用它,如以下示例所示。
function illuminate(light) {
light. // Accurate statement completion is not available
// unless illuminate is called elsewhere with a
// parameter that has a value. If it is called only
// in a function that is a sibling to
// illuminate(light) in the call hierarchy, the
// IntelliSense engine also cannot determine the
// parameter type.
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.