isDirective function

bool isDirective(
  1. ElementAnnotation annotation
)

Checks if an ElementAnnotation node implements Directive.

Implementation

bool isDirective(ElementAnnotation annotation) =>
    isComponent(annotation) || matchAnnotation($Directive, annotation);