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.

Parameters

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

Returns

boolean

Whether the decorator application is valid