...

/

Using the never type

Using the never type

In this lesson, we'll learn about the 'never' type and how it is different from the 'void' type.

We'll cover the following...

An example #

The code below is an arrow function expression that contains an infinite loop where a message is output to the console:

const keepLogging = (message: string) => {
while (true) {
console.log(message);
}
}

What do you think ...