removeEdge(edge, callback) {
    this.connections.forEach((connection) => {
      if (!connection) { return; }
      if ((edge.to.node !== connection.to.process.id) || (edge.to.port !== connection.to.port)) {
        return;
      }
      connection.to.process.component.inPorts[connection.to.port].detach(connection);
      if (edge.from.node) {
        if (connection.from
          && (edge.from.node === connection.from.process.id)
          && (edge.from.port === connection.from.port)) {
          connection.from.process.component.outPorts[connection.from.port].detach(connection);
        }
      }
      this.connections.splice(this.connections.indexOf(connection), 1);
    });
    if (callback) {
      deprecated('Providing a callback to Network.removeEdge is deprecated, use Promises');
      callback(null);
    }
    return Promise.resolve();
  }
@param {import("fbp-graph/lib/Types").GraphEdge} edge
@param {ErrorableCallback} [callback]
@returns {Promise<void>}