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 Mar 25, 2021. It is now read-only.
this.thing1 vs. thing1 have different meanings - consider the case below:
classFoo{constructor(publicfoo=20){this.foo=10;foo=5;}}constf=newFoo();alert(f.foo);// will display 10
If a private parameter property of a constructor is never accessed accessed anywhere in the class as this.myProperty, it actually still is unused as a class member and I think the lint rule is succeeding. Does this line up with what you're seeing from TSLint?
Bug Report
3.11.0
1.8.10
gulp-tslint
via Visual Studio 2015TypeScript code being linted
with
tslint.json
configuration:Actual behavior
The private
thing1
variable is reported as unused, even though it is used without thethis.
prefix, which is allowed in a constructor.Expected behavior
Used variables in the constructor should not require the
this.
prefix to be considered "used"The text was updated successfully, but these errors were encountered: