Share via


Value.Is

Syntax

Value.Is(value as any, type as type) as logical

About

Determines whether a value is compatible with the specified type. This is equivalent to the "is" operator in M, with the exception that it can accept identifier type references such as Number.Type.

Example 1

Compare two ways of determining if a number is compatible with type number.

Usage

Value.Is(123, Number.Type) = (123 is number)

Output

true