This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 885
false positive: no-shadowed-variable #1099
Labels
Comments
Have another set of reproduction steps if it helps. Presumably the same issue: class MyClass { };
declare type MyConstructor = new (myVariable: any) => MyClass;
function MyFunction(constructor: MyConstructor)
{
const myVariable = 1;
console.log(myVariable);
} tslint version 3.13.0 |
@bencoveney which identifier is reported as shadowed in that example? |
Sorry, the error message is:
|
@adidahiya, @jkillian looks like parameters from |
@IllusionMH sounds reasonable. I assume that those syntax kinds are distinct from constructor/function declarations? i.e. this would still produce a lint failure: function MyFunction(x: any) {
let x: string;
^ Shadowed variable 'x'
} |
IllusionMH
added a commit
to IllusionMH/tslint
that referenced
this issue
Aug 15, 2016
Fixed by #1482 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
tslint: 3.7.1
error: shadowed variable: 'args'
The text was updated successfully, but these errors were encountered: