Infer the node names from a compiled graph.
Extracts the ~NodeType phantom property from CompiledGraph instances, providing a union of all node names defined in the graph.
~NodeType
const graph = new StateGraph(StateAnnotation) .addNode("agent", agentFn) .addNode("tool", toolFn) .compile();type NodeNames = InferNodeNames<typeof graph>; // "agent" | "tool" Copy
const graph = new StateGraph(StateAnnotation) .addNode("agent", agentFn) .addNode("tool", toolFn) .compile();type NodeNames = InferNodeNames<typeof graph>; // "agent" | "tool"
Infer the node names from a compiled graph.
Extracts the
~NodeTypephantom property from CompiledGraph instances, providing a union of all node names defined in the graph.