Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GraphBuilder<In, Out>

Graph builder

Type parameters

Hierarchy

Index

Constructors

Protected constructor

  • new GraphBuilder<In, Out>(graph?: GraphShape<In, Out>): GraphBuilder<In, Out>

Properties

graph

graph: GraphShape<In, Out>

Methods

addEdge

addNode

addShape

build

  • build(): Promise<Graph<In, Out>>

deleteEdge

deleteNode

  • deleteNode(node: GraphNode<any, any>): GraphBuilder<In, Out>

from

on

  • on(name: "ready", listener: () => void | Promise<void>): GraphBuilder<In, Out>
  • on(name: "prebuild", listener: () => void | Promise<void>): GraphBuilder<In, Out>
  • on(name: "postbuild", listener: (model: GraphShape<any, any>) => void | Promise<void>): GraphBuilder<In, Out>
  • Event when graph is ready

    Parameters

    • name: "ready"

      ready

    • listener: () => void | Promise<void>

      Event callback

        • (): void | Promise<void>
        • Returns void | Promise<void>

    Returns GraphBuilder<In, Out>

  • Event before building the graph

    Parameters

    • name: "prebuild"

      prebuild

    • listener: () => void | Promise<void>

      Event callback

        • (): void | Promise<void>
        • Returns void | Promise<void>

    Returns GraphBuilder<In, Out>

  • Event after building the graph

    Parameters

    • name: "postbuild"

      postbuild

    • listener: (model: GraphShape<any, any>) => void | Promise<void>

      Event callback

        • (model: GraphShape<any, any>): void | Promise<void>
        • Parameters

          • model: GraphShape<any, any>

          Returns void | Promise<void>

    Returns GraphBuilder<In, Out>

Static create