@pond-ts/process API Reference
    Preparing search index...

    Class Graph

    A read-only view over a wired set of nodes.

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • Nodes in dependency order — every node appears after the nodes feeding it. Evaluation doesn't need this (pulling is recursive and finds its own order); it's for display and for reasoning about a graph you didn't build.

      The DFS is seeded in node-id order rather than discovery order, so the result depends only on which nodes are in the graph — not on which node Graph.from happened to start from. Several topological orders are usually valid; this picks the same one every time.

      Returns readonly Node<any, any>[]

    • Structural dump: node ids, kinds, port names, and edges.

      Nodes come out in order, not discovery order, so the dump of a given graph is the same whichever node Graph.from started at — which is what makes it safe to diff two dumps against each other.

      This is a description, not a serialization — there is no fromJSON. Rebuilding a graph from JSON needs a registry mapping kind to a factory, plus per-node config in the dump; neither exists yet. Use this for inspection, diffing, and rendering.

      Returns GraphJson

    • Discovers every node reachable from roots, following connections in both directions.

      const graph = Graph.from(sink);
      graph.order().map((node) => node.kind);

      Parameters

      • ...roots: readonly Node<any, any>[]

      Returns Graph