小编Phi*_*ick的帖子

Intellisense 可以识别 javascript 原型函数吗?

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

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
Run Code Online (Sandbox Code Playgroud)

javascript intellisense prototype visual-studio-code

5
推荐指数
1
解决办法
1491
查看次数