This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
no-shadow if a type alias and function argument share the same name #459
Closed
Description
What version of TypeScript are you using?
2.7.1
What version of typescript-eslint-parser
are you using?
14.0.0
What code were you trying to parse?
type foo = any;
function bar(foo: any) {}
What did you expect to happen?
Not a no-shadow
error.
What happened?
2:14 error 'foo' is already declared in the upper scope no-shadow
In contrast, this works as expected (no such error):
type foo = any;
let foo: any;