Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RemoteSet<T>

A RemoteSet is similar to the standard Javascript set, however, operations against it may result in a network operation. Also note, that no mutation is allowed aside from clearing all or removing elements, though even in these cases removal may not be guaranteed; be sure to check the return value from the clear and delete function to verify if deletion actually occurred.

Type parameters

  • T

Hierarchy

  • RemoteSet

Implemented by

Index

Properties

Methods

Properties

Readonly size

size: Promise<number>

Returns the number of values in the Set object.

returns

the number of values in the Set object

Methods

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<T>
  • The iterator over this set.

    Returns IterableIterator<T>

    a iterator over this set

clear

  • clear(): Promise<boolean>
  • Removes all elements from the Set object.

    Returns Promise<boolean>

    a Promise resolving to true if the elements were removed from this set, otherwise resolves to false

delete

  • delete(value: T): Promise<boolean>
  • Removes the specified element from this set if it is present.

    Parameters

    • value: T

      the value to be removed from this set, if present

    Returns Promise<boolean>

    a Promise resolving to true if the elements were removed from this set, otherwise resolves to false

has

  • has(value: T): Promise<boolean>
  • Returns true if this set contains the specified element.

    Parameters

    • value: T

      whose presence in this set is to be tested

    Returns Promise<boolean>

    a Promise resolving to true if set contains the value, or false if not