MCPcopy Create free account
hub / github.com/codemix/graph / intersect

Method intersect

packages/graph/src/Traversals.ts:1060–1067  ·  view source on GitHub ↗

* Intersect the vertices in the traversal with another traversal. * @param other The other traversal to intersect with.

(
    other: VertexTraversal<TSchema, TOtherPath>,
  )

Source from the content-addressed store, hash-verified

1058 * @param other The other traversal to intersect with.
1059 */
1060 public intersect<const TOtherPath extends TraversalPath<any, any, any>>(
1061 other: VertexTraversal<TSchema, TOtherPath>,
1062 ) {
1063 return new VertexTraversal<TSchema, TPath & TOtherPath>(this.graph, [
1064 ...this.steps,
1065 new IntersectStep({}, other.steps),
1066 ]);
1067 }
1068
1069 /**
1070 * Deduplicate the vertices in the traversal.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected