-
Notifications
You must be signed in to change notification settings - Fork 889
Incorrect errors when adding this
parameter to functions
#1393
Comments
Can you please dig in and find the tslint & typescript version actually in use? By "latest" do you mean v2.0? I think this has to do with some new syntax introduced recently into the language. |
The definition of a |
Do you still need more information? |
@olee have you tryied using |
How would I go about using tslint@next in Atom-typescript so I can try it? |
You could try |
Indeed, using tslint together with typescript@next seems to work properly with this test code: function formatShortDate(this: Date) {
return `${this.getFullYear()}-${this.getMonth()}-${this.getDate()}`;
}
Date.prototype.formatShortDate = formatShortDate;
console.log(new Date().formatShortDate()); Now I just need to figure out how to get atom-tslint to use typescript@next (or tslint@next) as well... EDIT: Seems that linter-tslint allows using different tslint version, however right now it crashes when loading new typescript version so that needs to be fixed first: AtomLinter/linter-tslint#104 |
Glad it's not a TSLInt bug! Going to close this issue, but feel free to continue discussion here if needed |
Bug Report
linter-tslint
)TypeScript code being linted
Actual behavior
The following errors are show (in Atom)
Expected behavior
No error shown
The text was updated successfully, but these errors were encountered: