Which Typescript user will result in an error?

A small TypeScript pattern that often slips through reviews. You define a union, handle a couple of cases, and move on. Later, a new variant gets introduced. Nothing crashes immediately. But something is off. What happens when this function is called?
Check it out and share your answer in the comments.

Subscribe to Google for Developers → https://goo.gle/developers

Speakers: Marily Nika

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top