src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
/**
   * Creates a templatized instance of the specified type. Only ObjectTypes can currently be
   * templatized; extend the logic in this function when more types can be templatized.
   *
   * @param baseType the type to be templatized.
   * @param templatizedTypes a map from TemplateType to corresponding JSType value. Any unfilled
   *     TemplateTypes on the baseType that are *not* contained in this map will have UNKNOWN_TYPE
   *     used as their value.
   */
Creates a templatized instance of the specified type. Only ObjectTypes can currently be
templatized; extend the logic in this function when more types can be templatized.

@param baseType the type to be templatized.
@param templatizedTypes a map from TemplateType to corresponding JSType value. Any unfilled
TemplateTypes on the baseType that are *not* contained in this map will have UNKNOWN_TYPE
used as their value.
Creates a templatized instance of the specified type . Only ObjectTypes can currently be templatized ; extend the logic in this function when more types can be templatized . @param baseType the type to be templatized . @param templatizedTypes a map from TemplateType to corresponding JSType value . Any unfilled TemplateTypes on the baseType that are * not * contained in this map will have UNKNOWN_TYPE used as their value .
public TemplatizedType createTemplatizedType(
      ObjectType baseType, Map<TemplateType, JSType> templatizedTypes) {
    JSType unknownType = getNativeType(UNKNOWN_TYPE);
    return createTemplatizedType(
        baseType,
        mapTypes(
            (key) -> templatizedTypes.getOrDefault(key, unknownType),
            baseType.getTypeParameters()));
  }
public TemplatizedType createTemplatizedType ( ObjectType baseType , Map < TemplateType , JSType > templatizedTypes ) { JSType unknownType = getNativeType ( UNKNOWN_TYPE ) ; return createTemplatizedType ( baseType , mapTypes ( ( key ) -> templatizedTypes . getOrDefault ( key , unknownType ) , baseType . getTypeParameters ( ) ) ) ; }
Creates a templatized instance of the specified type.
Creates a templatized instance of the specified type .