Loading
Current section: 6. Void and Never 4 exercises
Problem

Never Type

Loading exercise

Transcript

00:00 Now we're gonna talk about never. We're never gonna talk about oh, I sorry. I tried to come up with a funny pun. I'm a dad, but I failed. We're gonna understand the never type.

00:10 This is a special kind of type that says the effectively, this should never happen and then TypeScript can enforce that that thing never happens in your code. So in this example, we're gonna give you a couple of situations that should never be and TypeScript enforcing that to help you understand the never type. This isn't something that you'd use a ton. I I don't use it on a day to day basis myself, at least not explicitly. But but yeah, you will run into it and hopefully, it makes sense, when we're talking about errors and stuff that we're gonna be throwing around.

00:43 So have a good time with this one and we'll see you when you're finished with that and we can go through it together.