[F] isTypeSpecValueTypeOf
function isTypeSpecValueTypeOf<K>(target, expectedType): target is InferredTypeSpecValue<K>;
Check if the given target is of any of the TypeSpec types.
Type Parameters
Section titled “Type Parameters”Type Parameter |
---|
K extends TypeKind |
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
target | TypeSpecValue | Target to validate. |
expectedType | K | readonly K [] | One or multiple allowed TypeSpec types. |
Returns
Section titled “Returns”target is InferredTypeSpecValue<K>
boolean if the target is of one of the allowed types.