Closed
Description
Repro
{
"rules": {
"no-unused-vars": "off",
"typescript/no-unused-vars": "error"
}
}
type Foo = number
function test<Foo>(bar: Foo) {
return bar
}
Expected Result
error that type Foo
is not defined
Actual Result
all is good
Additional Info
There is few issues there:
- markVariableAsUsed is iterating over all variables even if found first one,
- type parameters are not validated
Versions
package | version |
---|---|
eslint-plugin-typescript |
1.0.0-rc.1 |
typescript-eslint-parser |
internal |
typescript |
3.1.1 |