If a legacy library, return the legacy version of the type. Otherwise, return the original type.
type
DartType toLegacyTypeIfOptOut(DartType type);