I just installed Resharper 9, and I'm liking its improved Typescript support quite a bit. But I'm running into an error in scenarios like this:
module Test {
export function sayHello() {
alert('Hi!');
}
}
Test.sayHello = () => console.log('Hi!');
That's a perfectly valid bit of Typescript syntax (it compiles and runs without any errors or warnings), and is very handy for mocking scenarios and so forth. However, Resharper 9 is flagging the last line as an error:
The left hand side of an assignment expression must be a variable, property or indexer.
Now, Resharper isn't the TS compiler, so in theory I can just ignore the error, but when there are dozens of these inaccurate error assessments in one of my files, it's hiding legitimate errors.
I haven't been able to figure out how to turn off just this bit of error checking. I've reported this as a bug, and presumably they'll fix it eventually, but in the meantime, it's quite distracting.
Any suggestions for a workaround, shy of going back to Resharper 8?
Unfortunately, no workaround is available, sorry. Thanks a lot for your report, I've created an issue: https://youtrack.jetbrains.com/issue/RSRP-428835. Will be fixed in the first bugfix update for 9.0.