I installed WebStorm 2020.1 yesterday.
Suddenly I got a bunch of TS2532 errors.

How can this be "possible undefined"? The selectedOwner && protects against that?
I tried to disabled this stupid error with "strictNullChecks": false, but has no effect.
Webstorm is occasionally slow to propagate the changes.
What I would recommend is to check and ensure that you the webstorm TypeSript service is using the right TypeScript version, and that it is using the right tsconfig.json file on your project.
On the Webstorm menu, go to Preferences -> Languages & Frameworks -> TypeScript.
Ensure that is is loading TypeScript from your project's node_modules, and not anywhere else. In addition, the compile scope should be set to Project Files
It may also help if you restart TypeScript service.
In addition, if you are using TypeScript 3.7.5 and above, you can simplify your conditional rendering by using optional chaining:
selectedLocalOwner?.id && .....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With