js-util

Home > rc-js-util > mapClearingDeleteFromSet

mapClearingDeleteFromSet() function

Used with maps that store sets. Where a set exists for a given key the value will be removed from that set.

Signature:

export declare function mapClearingDeleteFromSet<TKey extends object, TValue>(map: WeakMap<TKey, ISetLike<TValue>>, key: TKey, value: TValue): boolean;

Parameters

Parameter Type Description
map WeakMap<TKey, ISetLike<TValue>> The Map to check. May be modified.
key TKey The key to lookup in map.
value TValue The value to remove.

Returns:

boolean

true - If value was removed.

Remarks

See mapDeleteFromSet().