[英]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.