Skip to content
0:00 / 0:00

#typescriptreturntypes#typeinference

Be Careful With Return Types In TypeScript

Theo - t3․gg

576K subscribers • 4 videos on Hallway

YouTube
  • Recommended by 3 people: 3 in engineering communities.
  • Presented by Theo Browne
  • An opinion. It argues one side of a question engineers disagree on.

Intermediate. Assumes working knowledge.

69K views3 years ago3 recommendations

Programming languagesTypeScript

Theo Browne discusses the trade-offs of explicit return types versus type inference in TypeScript.

I'm sorry Prime ❤️ #typescript THANK YOU TO ALL THE AWESOME GUESTS - Malte twitter.com/cramforce - Trash @trash_dev - Ben Holmes twitter.com/BHolmesDev/ - Josh Goldberg twitter.com/JoshuaKGoldberg - Dax Raad twitter.com/thdxr - Maple twitter.com/heyImMapleLeaf - Alex twitter.com/alexdotjs/ - Tanner twitter.com/tannerlinsley - Kent C Dodds twitter.com/kentcdodds/ - Matt Pocock @mattpocockuk ALL MY VIDEOS ARE POSTED EARLY ON PATREON patreon.com/t3dotgg Everything else (Twitch, Twitter, Discord & my blog): t3.gg/links

Why it's here

3 people recommend this

What people say. Recommended for developers debating whether to explicitly define return types or rely on TypeScript's type inference.

u/JohntheAnabaptistin r/typescript • Recommends

On “What are the most important concepts to learn when going from js to typescript?”

This discusses it a bit link to this video

u/softgripperin r/typescript • Recommends

On “opinion: implicit return types is a bad practice”

Theo did a video on this a year or so ago. [video TLDR - be careful.

u/BritainRittenin r/typescript • Recommends

Return Type or Not To Return Type Drama: Theo gives his reasoning for usually skipping defining return types in TS functions