How to fix this simple but hard to troubleshoot TypeScript problem
Hey there!
You are receiving this email because you subscribed to my blog, words. - I am Manuele J Sarfatti, and this is the first newsletter I ever send.
When writing regular JavaScript we are used to a certain degree of flexibility when it comes to objects. TypeScript instead isn’t so forgiving.
While it's trivial in JavaScript to see if an object has the shape we expect by inspecting one of its properties, things quickly fall apart when trying to do the same with TypeScript.
In my new post (1 min read, excluding code) I'll explain why TypeScript complains, and show a simple solution step by step. Let's go.
Don't miss what's next. Subscribe to On code, life and beauty.: