TypeScript support fails with closures

TypeScript support in ReSharper 8.0 falsely believes the function parameter name in the code snippet below is unused and that it is overridden in the nested function's body:

function test(values: string[], name: string): string {
     var x = '';
     values.forEach((s: string) => {
          x += s + ': ' + name;
     });
     return x;
}


See below:

http://content.screencast.com/users/NathanRidley/folders/Jing/media/6363e88b-3ed2-42b3-9a4f-2dad01e9a847/2013-08-16_1928.png

1 comment
Comment actions Permalink

Hello Nathan,

I logged a new ticket to YouTrack - http://youtrack.jetbrains.com/issue/RSRP-383511.

Thanks!

0

Please sign in to leave a comment.