👩💻 Join our community of thousands of amazing developers!
Typescript somehow always manages to find new and exciting ways to surprise me. It’s no secret that investing time in defining good types for your projects is well worth it as you get better intellisense and lower cognitive load when dealing with your custom types. (What properties exist on this object again?) However, sometimes it can be difficult to define a type for an upstream service, like an API. If you know what keys/types to expect beforehand you might define your types as such:...