2min chapter

Frontend First cover image

Lying in TypeScript

Frontend First

CHAPTER

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.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode