Class ReadonlySvelteSet<T>

Provides a readonly variant of SvelteSet wrapping an instance of SvelteSet as the source.

Type Parameters

  • T
Implements
Index
  • get size(): number

    Returns the number of unique elements in this set.

    Returns number

  • Iterates over values in the set.

    Returns SetIterator<T>

  • Type Parameters

    • U

    Parameters

    • other: ReadonlySetLike<U>

    Returns Set<T>

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

  • Executes a provided function once for each value in this set, in insertion order.

    Parameters

    • callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void

      Callback function.

    • OptionalthisArg: any

      Optional this reference for callback function.

    Returns void

  • Returns a boolean indicating whether an element with the specified value exists in this set or not.

    Parameters

    • value: T

      Value to test.

    Returns boolean

  • Type Parameters

    • U

    Parameters

    • other: ReadonlySetLike<U>

    Returns Set<T & 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.

  • Type Parameters

    • U

    Parameters

    • other: ReadonlySetLike<U>

    Returns Set<T | 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<T | U>

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