Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • RemoteRoom

Index

Constructors

Properties

Methods

Constructors

constructor

  • new RemoteRoom(roomId: string, data?: Record<string, unknown>): RemoteRoom
  • Create a remote room.

    Parameters

    • roomId: string
    • Default value data: Record<string, unknown> = {}

      The key-value data object to assign to this room.

    Returns RemoteRoom

Properties

data

data: Record<string, unknown>

The key-value data object to assign to this room.

roomId

roomId: string

Methods

get

  • get<T>(key: string): T
  • Get the data value for the given key.

    Type parameters

    • T

    Parameters

    • key: string

      An arbitrary bridge-specific key.

    Returns T

    Stored data for this key. May be undefined.

getId

  • getId(): string

serialize

  • serialize(): Record<string, unknown>
  • Serialize all the data about this room, excluding the room ID.

    Returns Record<string, unknown>

    The serialised data

set

  • set(key: string, val: unknown): void
  • Set an arbitrary bridge-specific data value for this room.

    Parameters

    • key: string

      The key to store the data value under.

    • val: unknown

      The data value. This value should be serializable via JSON.stringify(data).

    Returns void

Generated using TypeDoc