Skip to main content
Version: Latest (0.60.x)

[F] isCadlValueTypeOf

function isCadlValueTypeOf<K>(target, expectedType): target is InferredTypeSpecValue<K>

Type Parameters

Type Parameter
K extends TypeKind

Parameters

ParameterTypeDescription
targetTypeSpecValueTarget to validate.
expectedTypeK | readonly K[]One or multiple allowed TypeSpec types.

Returns

target is InferredTypeSpecValue<K>

Deprecated

use isTypeSpecValueTypeOf