When to use `never` and `unknown` in Typescript

added by JavaScript Kicks
1/30/2019 8:09:05 AM

681 Views

The never and unknown primitive types were introduced in Typescript v2.0 and v3.0 respectively. These two types represent fundamental and complementary aspects of type theory. Typescript is carefully designed according to principles of type theory, but it is also a practical language, and its features all have practical uses - including never and unknown.


0 comments