Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • RemoteUser

Index

Constructors

Properties

Methods

Constructors

constructor

  • new RemoteUser(id: string, data?: Record<string, unknown>): RemoteUser
  • throws

    If identifier is not supplied.

    Parameters

    • id: string
    • data: Record<string, unknown> = {}

      The serialized key-value data object to assign to this user.

    Returns RemoteUser

Properties

Readonly data

data: Record<string, unknown> = {}

Readonly id

id: 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