Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Graph<In, Out>

Type parameters

Hierarchy

  • GraphNode<In, Out>

Index

Properties

edges

edges: Edge<any>[]

graph

graph: any

Graph shape

name

name: string

Name of the node. Does not have to be unique.

nodes

nodes: GraphNode<any, any>[]

uid

uid: string = ...

Unique identifier of node.

Accessors

inlets

  • get inlets(): Inlet<In>[]

outlets

  • get outlets(): Outlet<Out>[]

Methods

addEdge

  • addEdge(edge: Edge<any>): void

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): Graph<In, Out>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Graph<In, Out>

addNode

  • addNode(node: GraphNode<any, any>): void

deleteEdge

  • deleteEdge(edge: Edge<any>): void

deleteNode

  • deleteNode(node: GraphNode<any, any>): void

emit

  • emit(name: string | symbol, ...args: any[]): boolean
  • emit(event: "available"): boolean
  • emit(name: "completed", e: PushCompletedEvent): boolean
  • emit(name: "error", e: PushError): boolean
  • emit(name: "ready"): boolean
  • emit(name: "destroy"): boolean

emitAsync

  • emitAsync(type: string | symbol, ...args: any[]): Promise<boolean>

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

findNodeByName

  • findNodeByName(name: string): GraphNode<any, any>
  • Find a node by its name

    Parameters

    • name: string

      Node name

    Returns GraphNode<any, any>

    Graph node

findNodeByUID

  • findNodeByUID(uid: string): GraphNode<any, any>
  • Find a node by its identifier

    Parameters

    • uid: string

      Node identifier

    Returns GraphNode<any, any>

    Graph node

getMaxListeners

  • getMaxListeners(): number
  • Returns number

isAvailable

  • isAvailable(): boolean
  • Check if the node is available for accepting push requests

    Returns boolean

    Is the node available to push

isReady

  • isReady(): boolean

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

logger

  • logger(level: string, log: any): void

off

  • off(event: string | symbol, listener: (...args: any[]) => void): Graph<In, Out>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Graph<In, Out>

on

  • on(name: string | symbol, listener: (...args: any[]) => void): Graph<In, Out>
  • on(event: "available", listener: () => void | Promise<void>): Graph<In, Out>
  • on(name: "completed", listener: (event: PushCompletedEvent) => void | Promise<void>): Graph<In, Out>
  • on(name: "error", listener: (event: PushError) => void | Promise<void>): Graph<In, Out>
  • on(name: "pull", listener: (options?: PullOptions) => void | Promise<void>): Graph<In, Out>
  • on(name: "push", listener: (frame: In, options?: PushOptions) => void | Promise<void>): Graph<In, Out>

once

  • once(name: string | symbol, listener: (...args: any[]) => void): Graph<In, Out>
  • once(event: "available", listener: () => void | Promise<void>): Graph<In, Out>
  • once(name: "completed", listener: (event: PushCompletedEvent) => void | Promise<void>): Graph<In, Out>
  • once(name: "destroy", listener: () => void | Promise<void>): Graph<In, Out>
  • once(name: "build", listener: (builder: any) => void | Promise<void>): Graph<In, Out>
  • once(name: "ready", listener: () => void | Promise<void>): Graph<In, Out>
  • Parameters

    • name: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Graph<In, Out>

  • Event when a node is available

    Parameters

    • event: "available"

      available

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

      Event callback

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

    Returns Graph<In, Out>

  • Event when a push is completed

    Parameters

    Returns Graph<In, Out>

  • Event called when node is destroyed

    Parameters

    • name: "destroy"

      destroy

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

      Event callback

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

    Returns Graph<In, Out>

  • Event called when node is build

    Parameters

    • name: "build"

      build

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

      Event callback

        • (builder: any): void | Promise<void>
        • Parameters

          • builder: any

          Returns void | Promise<void>

    Returns Graph<In, Out>

  • Event called when node is ready

    Parameters

    • name: "ready"

      ready

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

      Event callback

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

    Returns Graph<In, Out>

onceAvailable

  • onceAvailable(): Promise<void>
  • Promise once the node is available

    Returns Promise<void>

    Promise when the node is available

onceCompleted

  • onceCompleted(frameUID: string): Promise<PushEvent>
  • Promise once the frame is completed

    Parameters

    • frameUID: string

      Frame UID

    Returns Promise<PushEvent>

    Promise when the frame is completed

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): Graph<In, Out>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Graph<In, Out>

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): Graph<In, Out>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Graph<In, Out>

pull

push

  • push(data: In | In[], options?: PushOptions): Promise<void>

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): Graph<In, Out>
  • Parameters

    • Optional event: string | symbol

    Returns Graph<In, Out>

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): Graph<In, Out>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Graph<In, Out>

setMaxListeners

  • setMaxListeners(n: number): Graph<In, Out>
  • Parameters

    • n: number

    Returns Graph<In, Out>