Resharper false type convert error for Typescript 3 unknown type
I'm using Visual Studio 2017 with Resharper 2018.3.
Resharper shows false error when you try to assign anything to unknown type.
Turning off Resharper or just Javascript/Typescript from Resharper solves this issue (error is not shown anymore) but it prevents using useful Resharper's features with Javascript/Typescript. Cannot find any setting how to turn off just such types convert errors.
const vUnknown: unknown = 10;
This is absolutely valid Typescript code, which is built fine and runs fine. But Resharper show this error: "Cannot convert type '10' to tpe 'any': Number literal '10' is not assignable to non-number type 'any'".
How can I prevent such false errors showing? Maybe there are any workarounds for that?
Please sign in to leave a comment.