TypeScript 3.0: The unknown Type

added by JavaScript Kicks
5/16/2019 7:27:47 AM

298 Views

TypeScript 3.0 introduced a new unknown type which is the type-safe counterpart of the any type. The main difference between unknown and any is that unknown is much less permissive than any: we have to do some form of checking before performing most operations on values of type unknown, whereas we don't have to do any checks before performing operations on values of type any.


0 comments