Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

unknown typescript

unknown is the type-safe counterpart of any. 
Anything is assignable to unknown, but unknown isn’t assignable 
to anything but itself and any without a type assertion or a
control flow based narrowing. 
Likewise, no operations are permitted on an unknown without 
first asserting or narrowing to a more specific type

Take a look here for some examples:
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #unknown #typescript
ADD COMMENT
Topic
Name
7+7 =