javascript - Intellisense 可以识别 javascript 原型(prototype)函数吗?

标签 javascript prototype intellisense visual-studio-code

我正在使用 VS Code,我希望 Intellisense 能够识别 javascript 原型(prototype)函数。有没有办法配置它这样做?

function MyObject() {}

MyObject.prototype.foo = function() {};
MyObject.prototype.bar = function() {};

var myObj = new MyObject();

myObj.  //I want Intellisense to show me the foo and bar functions here

最佳答案

最新版本的 VS Code 支持此功能。

https://github.com/Microsoft/TypeScript/wiki/Salsa

关于javascript - Intellisense 可以识别 javascript 原型(prototype)函数吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30986666/

相关文章:

sql-server - 为什么 Intellisense 在 SQL Server Management Studio 2008 R2 中不起作用?

javascript - 页面未在 IE 中加载

javascript - Flot 中的最小和最大选项不起作用

javascript - 无法解析模块说明符 "babel-runtime/regenerator"

javascript - 对数组元素进行编号的函数输出 "undefined"

javascript - 有人可以用更外行的术语解释什么是 util.inherits 吗?

javascript - 为什么不在字符串连接操作中调用 Number.toString()?

javascript - 花式盒子 3 : Setting different cursors for left & right side of the slider

javascript - 在 WebStorm 中为 node_modules 启用代码完成

objective-c - 如果我们不知道第一个字母,Objective C 中的代码意义