featherbit UI
    Preparing search index...

    Function edgesAfterConnect

    • Applies the cardinality and acyclicity rules to a proposed connection and returns the edge list the new edge should be added onto, or null to reject the connection.

      • Output side: a source port holds at most one outgoing edge — drawing from an already-wired port rewires it, dropping the previous edge.
      • Cycles: a connection whose target already reaches the source (over the edges left after the rewire) would close a loop and is rejected, as is a direct self-loop.

      A missing source handle is the success port (loaded edges fold out into success in policyToEdges); target handles play no role since inputs accept any number of edges.

      Type Parameters

      • E extends Pick<ProposedConnection, "source" | "target" | "sourceHandle" | "targetHandle">

      Parameters

      Returns E[] | null