Home > rc-js-util > mapClearingDeleteFromSet
Used with maps that store sets. Where a set exists for a given key the value will be removed from that set, if it is empty after removal, then the set is deleted.
Signature:
export declare function mapClearingDeleteFromSet<TKey, TValue>(map: Map<TKey, ISetLike<TValue>>, key: TKey, value: TValue): boolean;
Parameter | Type | Description |
---|---|---|
map | Map<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.
See mapDeleteFromSet().