meta_pixel
Tapesearch Logo
Log in
Syntax - Tasty Web Development Treats

Hasty Treat - TypeScript Utility Types

Syntax - Tasty Web Development Treats

Wes Bos

Tech News, News, Technology

4.9 • 1.2K Ratings

🗓️ 9 August 2021

⏱️ 17 minutes

🧾️ Download transcript

Summary

In this Hasty Treat, Scott and Wes talk about TypeScript utility types — what they are, why you might use them, why they exist, and more! Linode - Sponsor Whether you’re working on a personal project or managing enterprise infrastructure, you deserve simple, affordable, and accessible cloud computing solutions that allow you to take your project to the next level. Simplify your cloud infrastructure with Linode’s Linux virtual machines and develop, deploy, and scale your modern applications faster and easier. Get started on Linode today with a $100 in free credit for listeners of Syntax. You can find all the details at linode.com/syntax. Linode has 11 global data centers and provides 24/7/365 human support with no tiers or hand-offs regardless of your plan size. In addition to shared and dedicated compute instances, you can use your $100 in credit on S3-compatible object storage, Managed Kubernetes, and more. Visit linode.com/syntax and click on the “Create Free Account” button to get started. LogRocket - Sponsor LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax. Show Notes 03:35 - Levels of using TypeScript Typing your code Typing your code, but getting a little bit more dynamic using utility types Creating your own utility types! TypeScript is a language in itself Check out type challenges if you want your mind blown: https://github.com/type-challenges/type-challenges/ https://www.typescriptlang.org/docs/handbook/utility-types.html 07:29 - Partial 08:23 - ReadOnly 09:00 - Required 09:33 - Record A record is an object type that is a bit more restrictive Say you want to store podcast details - name, URL, showCount, etc., but only for Syntax and Shoptalk. 10:47 - Omit I find this one handy when I want to create a “Create Item” type, where it has all the item fields except the ID field 11:34 - Pick Given a type, pick these properties 12:39 - Return Types Gives you the type that is returned from a function. Handy if you need to dynamically generate the type based on a passed function. 13:30 - Case These case types are useful for when you are doing template literal types Uppercase Lowercase Capitalize Uncapitalize Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Transcript

Click on a timestamp to play from that location

0:00.0

Monday Monday Monday open wide dev fans get ready to stuff your face with Javascript CSS

0:07.4

Node module barbecue tips get workflows break dancing soft skills web development the hastiest the

0:13.5

Carrazius the tastiest web development treats coming in hot. Here is West

0:19.3

Barracuda boss and Scott L. Toro. Look go to Lenski

0:25.3

Welcome to syntax in this Monday hasty treat. We're going to be talking about

0:32.5

TUT TUT TypeScript utility types. I don't think anybody says TUT but we're going to be talking about

0:38.5

TypeScript utility types what they are why you might use them why they exist all of those things and more if you are a

0:45.1

TypeScript fan or TypeScript curious

0:47.1

This is the one for you. My name is Scott Lenski. I made developer from dead for color right on with me as always is the West

0:53.1

Boss. Hey everybody excited to talk about utility types. Yes. So before we get into it

0:59.9

Let's introduce a couple of our sponsors today. We have Linode, which is cloud hosting and log rocket West

1:05.8

You want to talk about Linode and I'll talk about log rocket. I do

1:11.1

Linode as cloud hosting developers trust they have award winning support

1:17.2

24 7 365 on Christmas morning. I'm going to

1:21.3

Call them about it would be very unfortunate to have to call them on Christmas morning, but they have somebody on just in case that type of thing happens

1:29.2

It's got ease of use and setup. It's clear why developers have been trusting you know

1:34.1

Linode for projects big and small since 2003

1:37.5

They're probably most well known for their

1:40.8

Linux servers that you can just quickly spin up a little box

1:44.0

You can SSH into it and start running your node apps or whatever it is, but they also have

1:49.8

Block storage, object storage, you can host your your images on there. They have node balancers

1:55.1

They have bare metal, Kubernetes, GPU, high memory, you name it and listen to this

...

Please login to see the full transcript.

Disclaimer: The podcast and artwork embedded on this page are from Wes Bos, and are the property of its owner and not affiliated with or endorsed by Tapesearch.

Generated transcripts are the property of Wes Bos and are distributed freely under the Fair Use doctrine. Transcripts generated by Tapesearch are not guaranteed to be accurate.

Copyright © Tapesearch 2026.