func (v ElementBuildingVisitor) typeElement(meta apply.FieldMetaImpl, item *typeItem) (*apply.TypeElement, error) {
	var fn schemaFn = func(key string) proto.Schema {
		if item.Type != nil && item.Type.Fields != nil {
			return item.Type.Fields[key]
		}
		return nil
	}
	values, err := v.createMapValues(fn, meta, item.MapElementData)
	if err != nil {
		return nil, err
	}
	return &apply.TypeElement{
		FieldMetaImpl:  meta,
		MapElementData: item.MapElementData,
		Values:         values,
	}, nil
}
typeElement builds a new mapElement from a typeItem
package parse
import (
	"k8s.io/kube-openapi/pkg/util/proto"
	"k8s.io/kubectl/pkg/apply"
)