Skip to main content

Type.Is

Determines if a value of the first type is always compatible with the second type.

Syntax

Type.Is(
type1 as type,
type2 as type
) as logical

Remarks

Determines if a value of type1 is always compatible with type2.

Examples

Example #1

Determine if a value of type number can always also be treated as type any.

Type.Is(type number, type any)

Result:

true

Example #2

Determine if a value of type any can always also be treated as type number.

Type.Is(type any, type number)

Result:

false

Category

Type