Property does not exist on type ‘never’
Have you ever tried to access a property on a value of type `never`? If so, you’ve probably seen an error message like this:
Property ‘foo’ does not exist on type ‘never’.
This error message can be confusing, especially if you’re not familiar with the `never` type. In this article, we’ll take a look at what the `never` type is, why it’s used, and why you might get an error message like the one above.
What is the `never` type?
The `never` type is a special type that represents values that can never be reached.