removeTypeGenerics static method

String removeTypeGenerics(
  1. String type
)

Removes generics from the type or record type string.

Implementation

static String removeTypeGenerics(String type) {
  while (true) {
    var type2 = type.replaceAll(_regexpGenerics, '');

    if (type2.length == type.length) {
      return type;
    } else {
      type = type2;
    }
  }
}