getEdges(tiddler, toWL, typeWL) {

    const tObj = utils.getTiddler(tiddler);

    if (!tObj || utils.isSystemOrDraft(tObj)) {
      return;
    }

    const { allETy } = this.indeces;
    const edges = utils.makeHashMap();
    const eTySubscribers = this.edgeTypeSubscriberRegistry.getAll();

    for (let i = 0, l = eTySubscribers.length; i < l; i++) {
      Object.assign(edges, (eTySubscribers[i]).loadEdges(tObj, toWL, typeWL));
    }

    for (let id in edges) {

      const edge = edges[id];

      // check exists for historical reasons...
      if (!edge.from || !edge.to) {
        continue;
      }

      const type = allETy[edge.type] || EdgeType.getInstance(edge.type);
      addStyleToEdge(edges[id], type);

      edges[id] = edge;
    }

    return edges;

  }
Returns all edges stored in a given tiddler. Any edge stored in a
tiddler is orginally an outgoing edge. Depending on how the user
changes the arrow head (by manipulating the Visjs edge-type style),
the edge may change its orientation and become an incoming edge or
bi-directional. Therefore, the edges retrieved may be incoming,
outgoing or both!

Returned edges may be of the following type:

- Edges stored in the tiddler text (=links).
- Edges stored in fields denoted by magic edge-types.
- TiddlyMap edges stored in a json format

@param {Tiddler} tiddler - A tiddler reference or object from
    which to retrieve the edges.
@param {Hashmap<TiddlerReference, boolean>} [toWL]
    A hashmap on which basis it is decided, whether to include
    an edge that leads to a certain tiddler in the result or not.
    In this case, all edges stored in the tiddler are treated as
    outgoing and the arrow head is ignored. If not specified,
    all edges are included.
@param {Hashmap<string, boolean>} [typeWL]
    A hashmap on which basis it is decided, whether to include
    an edge of a given type in the result or not. If not
    specified, all edges are included.