A SetMultiMap linking identifiers to a set of WebSockets. An extension of WrappedSetMultiMap to make sure Components.js allows us to create this in the config, as WrappedSetMultiMap has a constructor not supported.

Hierarchy (view full)

Implements

Constructors

  • Parameters

    • mapConstructor: (new () => Map<string, Set<WebSocket>>) = Map

      Will be used to instantiate the internal Map.

        • new (): Map<string, Set<WebSocket>>
        • Returns Map<string, Set<WebSocket>>

    • Optionaliterable: Iterable<readonly [string, WebSocket | ReadonlySet<WebSocket>]>

      Entries to add to the map.

    Returns WebSocketMap

Properties

[toStringTag]: "WrappedSetMultiMap" = 'WrappedSetMultiMap'

Accessors

Methods

  • Returns all values stored for the given key. Returns undefined if there are no values for this key.

    Parameters

    • key: string

    Returns undefined | ReadonlySet<WebSocket>

  • Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

    Parameters

    • key: string
    • value: WebSocket | ReadonlySet<WebSocket>

    Returns this