You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
I'm finding that the function level this-type introduced by Microsoft/TypeScript #6739 is triggering the "noReservedKeywords" rule.
Using this example from the PR
interface I {
n: number;
method: (m: number) => number;
}
function futureMethod(this: I, m: number) {
return this.n + m;
}
let o: I = { n: 12, method: futureMethod };
The this-type feature of TS declares the futureMethod has having one parameter (m) and that the
"this" object within its scope implements interface I.
But instead it has a tslint error:
[tslint] Forbidden reference to reserved keyword: this
(parameter) this: I
It feels like a special exception is needed for the this keyword, to allow for function this-types.
The text was updated successfully, but these errors were encountered:
I'm finding that the function level this-type introduced by Microsoft/TypeScript #6739 is triggering the "noReservedKeywords" rule.
Using this example from the PR
The this-type feature of TS declares the futureMethod has having one parameter (
m
) and that the"
this
" object within its scope implements interfaceI
.But instead it has a tslint error:
It feels like a special exception is needed for the this keyword, to allow for function this-types.
The text was updated successfully, but these errors were encountered: