4 Matching Annotations
- Aug 2021
-
github.com github.com
-
no plans to reduce empty cases to never more aggressively to help developers exclude weird/absurd/accidental cases
-
As a design decision, TypeScript does not collapse that type to `never` (although it could).
-
candidate is Dog { // compiler recognizes that Dog | T can narrow to T
-
that is, a type like {foo: never} does not itself get reduced to never even though you shouldn't be able to have a value of type {foo: never}
-