@arcmantle/library
    Preparing search index...

    Class ObservableSet<V>

    Type Parameters

    • V

    Hierarchy

    • Set<V>
      • ObservableSet
    Index

    Constructors

    • Type Parameters

      • V

      Parameters

      • Optionalvalues: null | readonly V[]

      Returns ObservableSet<V>

    • Type Parameters

      • V

      Parameters

      • Optionaliterable: null | Iterable<V, any, any>

      Returns ObservableSet<V>

    Properties

    "[toStringTag]": string
    observers: Map<string, Fn | AsyncFn> = ...
    size: number

    the number of (unique) elements in Set.

    "[species]": SetConstructor

    Methods

    • Iterates over values in the set.

      Returns SetIterator<V>

    • Removes a specified value from the Set.

      Parameters

      • value: V

      Returns boolean

      Returns true if an element in the Set existed and has been removed, or false if the element does not exist.

    • Type Parameters

      • U

      Parameters

      • other: ReadonlySetLike<U>

      Returns Set<V>

      a new Set containing all the elements in this Set which are not also in the argument.

    • Returns an iterable of [v,v] pairs for every value v in the set.

      Returns SetIterator<[V, V]>

    • Executes a provided function once per each value in the Set object, in insertion order.

      Parameters

      • callbackfn: (value: V, value2: V, set: Set<V>) => void
      • OptionalthisArg: any

      Returns void

    • Parameters

      • value: V

      Returns boolean

      a boolean indicating whether an element with the specified value exists in the Set or not.

    • Type Parameters

      • U

      Parameters

      • other: ReadonlySetLike<U>

      Returns Set<V & U>

      a new Set containing all the elements which are both in this Set and in the argument.

    • Parameters

      • other: ReadonlySetLike<unknown>

      Returns boolean

      a boolean indicating whether this Set has no elements in common with the argument.

    • Parameters

      • other: ReadonlySetLike<unknown>

      Returns boolean

      a boolean indicating whether all the elements in this Set are also in the argument.

    • Parameters

      • other: ReadonlySetLike<unknown>

      Returns boolean

      a boolean indicating whether all the elements in the argument are also in this Set.

    • Despite its name, returns an iterable of the values in the set.

      Returns SetIterator<V>

    • Attaches a listener to the Observable, that will be called whenever state changes

      Parameters

      • fn: (value: any, operation: Operation, from: any) => void

      Returns { id: string; unobserve: () => void }

    • Type Parameters

      • U

      Parameters

      • other: ReadonlySetLike<U>

      Returns Set<V | U>

      a new Set containing all the elements which are in either this Set or in the argument, but not in both.

    • Type Parameters

      • U

      Parameters

      • other: ReadonlySetLike<U>

      Returns Set<V | U>

      a new Set containing all the elements in this Set and also all the elements in the argument.

    • Returns an iterable of values in the set.

      Returns SetIterator<V>