isUnionType function
Whether type is a union: a value written in one of several forms.
Implementation
bool isUnionType(PropType type) =>
(type.kind == PropKind.value && const {'AxisSize', 'AxisPosition', 'IconData'}.contains(type.name)) ||
(type.kind == PropKind.object && type.fields.any((f) => f.key == 'type'));