Skip to content

[F] validateDecoratorNotOnType

function validateDecoratorNotOnType(
context,
type,
badDecorator,
givenDecorator): boolean;

Validate that a given decorator is not on a type or any of its base types. Useful to check for decorator usage that conflicts with another decorator.

ParameterTypeDescription
contextDecoratorContextDecorator context
typeTypeThe type to check
badDecoratorDecoratorFunctionThe decorator we don’t want present
givenDecoratorDecoratorFunctionThe decorator that is the reason why we don’t want the bad decorator present

boolean

Whether the decorator application is valid