如何使用 undefinedWithCompletionsOf(value) 智能感知功能?
Posted
技术标签:
【中文标题】如何使用 undefinedWithCompletionsOf(value) 智能感知功能?【英文标题】:How to use undefinedWithCompletionsOf(value) intellisense function? 【发布时间】:2013-12-30 00:31:00 【问题描述】:我想使用函数intellisense.undefinedWithCompletionsOf(value)
为所有未定义值显示窗口(或任何对象)的智能感知。但我无法让它工作。不幸的是,MSDN 也没有此功能的任何示例。
目前,我有 2 个文件:“intellisenseCode.js”,其中有:
intellisense.undefinedWithCompletionsOf(window);
和“appCode.js”,其中有:
/// <reference path="intellisenseCode.js" />
var hello;
hello. // should show intellisense for window object here
我在这里做错了吗?
谢谢!
【问题讨论】:
【参考方案1】:知道了!以下是您可以使用相关功能的方式:
function(param1, param2)
// param 1 is undefined for intellisense at this point
param1 = intellisense.undefinedWithCompletionsOf(window); // can set it to any type instead of window
param1. // shows intellisense for window object
【讨论】:
以上是关于如何使用 undefinedWithCompletionsOf(value) 智能感知功能?的主要内容,如果未能解决你的问题,请参考以下文章
如何在自动布局中使用约束标识符以及如何使用标识符更改约束? [迅速]
如何使用 AngularJS 的 ng-model 创建一个数组以及如何使用 jquery 提交?