Skip to main content
Version: Next 🚧

[F] validateDecoratorTarget

function validateDecoratorTarget<K>(
context,
target,
decoratorName,
expectedType): target is K extends "Any" ? Type : Type & Object

Validate the decorator target is matching the expected value.

Type Parameters

Type Parameter
K extends TypeKind

Parameters

ParameterTypeDescription
contextDecoratorContext
targetType
decoratorNamestring
expectedTypeK | readonly K[]

Returns

target is K extends "Any" ? Type : Type & Object