interface SetStoreMethods<K> {
    add: ((key: K) => void);
    addAll: ((keys: CopySet<any> | Iterable<K, any, any>) => void);
    clear: ((keyPatt?: Pattern) => void);
    delete: ((key: K) => void);
    getSize: ((keyPatt?: Pattern) => number);
    has: ((key: K) => boolean);
    keys: ((keyPatt?: Pattern) => Iterable<K, any, any>);
    snapshot: ((keyPatt?: Pattern) => CopySet<any>);
    values: ((keyPatt?: Pattern) => Iterable<K, any, any>);
}

Type Parameters

  • K

Properties

add: ((key: K) => void)

Add the key to the set if it is not already there. Do nothing silently if already there. The key must be one allowed by this store. For example a scalar store only allows primitives and remotables.

addAll: ((keys: CopySet<any> | Iterable<K, any, any>) => void)
clear: ((keyPatt?: Pattern) => void)
delete: ((key: K) => void)

Remove the key. Throws if not found.

getSize: ((keyPatt?: Pattern) => number)
has: ((key: K) => boolean)

Check if a key exists. The key can be any JavaScript value, though the answer will always be false for keys that cannot be found in this store.

keys: ((keyPatt?: Pattern) => Iterable<K, any, any>)
snapshot: ((keyPatt?: Pattern) => CopySet<any>)
values: ((keyPatt?: Pattern) => Iterable<K, any, any>)