Skip to main content
Version: Next 🚧

[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