[F] assertType
function assertType<TKind>( typeDescription, t, ... kinds): asserts t is Type & { kind: TKind[number] };Assert that the input type has one of the kinds provided
Type Parameters
| Type Parameter |
|---|
TKind extends ( | "Boolean" | "Decorator" | "Enum" | "EnumMember" | "FunctionParameter" | "Interface" | "Intrinsic" | "Model" | "ModelProperty" | "Namespace" | "Number" | "Operation" | "Scalar" | "ScalarConstructor" | "String" | "StringTemplate" | "StringTemplateSpan" | "TemplateParameter" | "Tuple" | "Union" | "UnionVariant")[] |
Parameters
| Parameter | Type |
|---|---|
typeDescription | string |
t | Type |
…kinds | TKind |
Returns
asserts t is Type & { kind: TKind[number] }