[F] validateDecoratorTarget
function validateDecoratorTarget<K>( context, target, decoratorName, expectedType): target is K extends "Any" ? Type : Type & ObjectValidate the decorator target is matching the expected value.
Type Parameters
| Type Parameter |
|---|
K extends TypeKind |
Parameters
| Parameter | Type | Description |
|---|---|---|
context | DecoratorContext | |
target | Type | |
decoratorName | string | |
expectedType | K | readonly K[] |
Returns
target is K extends "Any" ? Type : Type & Object