-
Notifications
You must be signed in to change notification settings - Fork 12.8k
In JS, this
in object literals is untyped
#11072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From @joaomoreno on September 20, 2016 8:17 @ishuvalov This is going to be very hard to get from the language service, because You could try using TypeScript, you'd get those language features all the way. |
From @ishuvalov on September 20, 2016 8:38 @joaomoreno Thank you for your comment! Let's omit Backbone (function(undefined) {
var myObj = {
secondFunc: function () {
return;
},
mainFunc: function() {
this.secondFunc()
}
};
})(); Still not working. I understand the difficulties of |
@ishuvalov thank you for opening this issue. I have repo'd this with JavaScript language service 2.0.2. Sending this to the TypeScript team as they provide the JavaScript language service. |
One option, in a .js file we can make the type of |
Basically, #8382, but only for JavaScript files, right? I think that could work. |
i guess so. |
this
in object literals is untyped
The second repro is fixed (and has been for some time) and the first can be fixed by improving backbone's types. |
From @ishuvalov on September 20, 2016 7:54
Steps to Reproduce:
this.secondFunc()
call.Copied from original issue: microsoft/vscode#12306
The text was updated successfully, but these errors were encountered: