I'm currently investigating whether this issue qualifies as a bug prior to submitting it on GitHub.
When the noUnusedParameters
setting is activated, the TypeScript compiler will generate an error in scenarios like this:
const foo = ['one', 'two', 'three'];
foo.forEach((item: string, index: number) => {
// do something just with index, ignoring item
});
The error message
error TS6133: 'item' is declared but never used.
may be misleading because even though 'item' is not explicitly utilized, it does play a role as the second argument to the forEach
iterator function represents the index.
Could there be something that I am overlooking here?