Better Types using Discriminated Unions in TypeScript How we define our types in Typescript impacts how effective typescript is at warning us when we make mistakes. If we take a broad approach i.e. to cover many types in a single type, we end up handicapping typescript and it becomes less effective. The more specific we…

Read More