_processEdgesWithType(type, { action, newName }) {

    type = EdgeType.getInstance(type);

    $tm.logger('debug', 'Processing edges', type, action);

    // get edges
    const edges = this.selectEdgesByType(type);

    if (action === 'rename') {

      // clone type first to prevent auto-creation
      (new EdgeType(newName, type)).save();

    }

    for (let id in edges) {

      this._processEdge(edges[id], 'delete');

      if (action === 'rename') {
        edges[id].type = newName;
        this._processEdge(edges[id], 'insert');
      }
    }

    // finally remove the old type
    this.wiki.deleteTiddler(type.fullPath);

  }
Deletes or renames all edges of a given type.

@param {string|EdgeType} type - Either the edge type id (name) or an EdgeType object.
@param {('rename'|'delete')} [action='delete']
@param {string} [newName]