Transcript
00:00 Okay. In this exercise, we're gonna talk about void and never. These are, never is a TypeScript only concept and void is actually both a JavaScript and TypeScript, concept. But we're gonna be focusing our, energy on the TypeScript side of things. So here, let's talk about the void type here really quick.
00:19 So you can explicitly, set your return type to be void. And what that means is there's no return statement, no no return at all. And so anybody calling this should not expect to be able to do anything with the result. That's pretty much all that void means. Never type is interesting because it, it represents a situation that could never possibly happen either because, the the if statements make it impossible for you to reach this point.
00:46 Like here's a value. It is a number. And then, or it is a it is either this string or this string. And if you checked both of those, then the results, like it's not possibly anything else so it's a never type. Or you threw an error so you can't possibly continue the program so that's a never type.
01:02 Or you entered an infinite loop and so you could never exit. That's another, never situation there. And so that that can, help guide you as you're writing your program, or the agent as it's writing the program for you. So, void and never, that's what we're gonna talk about in this exercise. We'll see you in the exercise steps.
