3 ms·
"never" is not really ever a good choice for a property/member type, because it is assignable to all types. A function that literally never returns could/shoul
by dgreensp 5y ago
"never" is not really ever a good choice for a property/member type, because it is assignable to all types. A function that literally never returns could/should have a return type of never, for example, but if the function actually returns a value, you have a "value of type never" which is supposed be impossible, and never acts like any (because a contradiction implies anything).
- eyelidlessness 5y ago> "never" is not really ever a good choice for a property/member type, because it is assignable to all types. This isn’t right. It’s not assignable to anything other than never, that’s why never is so useful for this use case.