Frontend First cover image

Lying in TypeScript

Frontend First

00:00

The Type Is Not Exclusive and That's What I'm Saying

The types aren't exclusive and they're not like actually accounting for the reality of every way that could be called. If some if you write a type that says I can be called with an array of any, then you your function has to now handle an array ofany so you have to handle array numbers and array of strings and array of Cats. You just have to make sure it's right because people can call this with like no or undefined as soon as someone calls it with no. And i'll say null is not valid type. That's kind of what we're talking about.

Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner