Full Stack Radio cover image

144: Gary Bernhardt - TypeScript and Testing

Full Stack Radio

00:00

Is That Really a Powerful Concept That I Could Easily Go Past People if They Didn't Like?

The type system is a union between five literal types, like the literal strings, subscribed, un subscribing, subscribed to d a, s et cetera. And so that allows us, whenever we need to create one of those values, and insures that we don't put in the wrong value or a value that doesn't exist. If we ever change the set of possible subscription or possible usor types, the type system will immediately put a type error at every single place in the entire system that reference is the one that's no longer exists. So i think that's a powerful concept that i could easily go past people if they didn't like. Really like what that lets you do

Play episode from 01:06:57
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