isEnum function

bool isEnum(
  1. Root root,
  2. TypeDeclaration type
)

Returns true if the TypeDeclaration represents an enum.

Implementation

bool isEnum(Root root, TypeDeclaration type) =>
    root.enums.map((Enum e) => e.name).contains(type.baseName);