Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

New rule: unused generic type parameter #1126

Closed
lostfictions opened this issue Apr 13, 2016 · 2 comments
Closed

New rule: unused generic type parameter #1126

lostfictions opened this issue Apr 13, 2016 · 2 comments

Comments

@lostfictions
Copy link

For example, in the Redux type definitions we see this:

export interface Dispatch<S> {
    <A extends Action>(action: A): A;
}

S is unused and only adds confusion and friction for consumers of this interface! It'd be useful to be able to show a warning in cases like this.

@myitcv
Copy link
Contributor

myitcv commented Apr 13, 2016

👍

For some reason I thought there was already an open issue for this, but I can't find one so thanks for opening @lostfictions

For useful background on the issues this creates see microsoft/TypeScript#7797 amongst other issues

@andy-hanson
Copy link
Contributor

Should be fixed by #2235, as the TypeScript implementation of no-unused-locals is used now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants