Training
Module
Declare variable types in TypeScript - Training
Learn about the available types and how to associate them with variables.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Type.Is(type1 as type, type2 as type) as logical
Determines if a value of type1
is always compatible with type2
.
Determine if a value of type number can always also be treated as type any.
Usage
Type.Is(type number, type any)
Output
true
Determine if a value of type any can always also be treated as type number.
Usage
Type.Is(type any, type number)
Output
false
Training
Module
Declare variable types in TypeScript - Training
Learn about the available types and how to associate them with variables.