Full Stack Radio cover image

144: Gary Bernhardt - TypeScript and Testing

Full Stack Radio

00:00

Is the Discriminator True or False?

If started is explicitly true, then last interaction must be a date. It cannot be undefined. The more you do that, especialy if you're doing multiple checks on multiple properties like that, you're not seeing the truth about the data. But as when you go back and read that code, you don't get this sort of higher level picture. If like, oh, there's just exactly two states the thing can be in. That should sort ofike, be sounding the alarms that probably you're mad an like, your type definition a.

Play episode from 01:17:27
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app