Fake Error: Cannot invoke an expression whose type lacks signature.

Answered

Hi, I have found an issue in my solution. Unfortunately, I can't reproduce it in other small solution.

I use Resharper Ultimate 2016.3.EAP9 in VS 2015, TypeScript file.

I have only screenshot of my problem:

This bug appears only in one module. In other modules this function works fine.

Project builds without some errors.

0
3 comments

Hi, Maxim. Could you please navigate to declaration on that "Error" and tell where it navigates? Thanks!

0
Avatar
Permanently deleted user

Hello, Anton.

The "Error" declaration is located in the "lib.d.ts" file that's included in VS typescript compiler.

And I found a way how to reproduce this issue: 

module Issue { throw new Error(""); }
enum Status { Error }

 

and tsconfig.json:

{
    "compilerOptions": {
        "allowJs": true
    }
}

If it's needed, I can create bug report with little solution for all these examples.

0

Thanks, reproduced. Reproducible only when allowJs is enabled. Created a new issue: https://youtrack.jetbrains.com/issue/RSRP-461836.

0

Please sign in to leave a comment.