Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Sockets<T>

Type parameters

  • T

Hierarchy

  • Sockets

Implemented by

Index

Methods

color

  • Parameters

    Returns T

colorBatch

  • Parameters

    Returns T

colors

  • Returns SocketColor[]

count

  • count(): number
  • Returns number

    current amount of sockets

isLinked

  • checks if {a} and {b} are linked

    Parameters

    • a: SocketId

      the socket to check

    • b: SocketId

      the socket for which to check if it is linked to a

    Returns boolean

link

  • links each pair of

    Parameters

    Returns T

mapColors

max

  • max(): number
  • deprecated

    use maxSockets() instead

    Returns number

    the maximum amount of sockets

maxLinks

  • maxLinks(): number
  • Returns number

    the biggest number of linked sockets

maxSockets

  • maxSockets(): number
  • Returns number

    the maximum amount of sockets

socket

  • sets the number of sockets to n

    Parameters

    • n: number
    • Optional options: Partial<SocketOptions>

      set {keep_links} to true if it should not reroll links

    Returns T

toJson

  • toJson(): Array<Socket & { group: number }>
  • Returns Array<Socket & { group: number }>

Generated using TypeDoc