rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
92 lines (43 loc) • 1.2 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [mapDeleteFromSet](./rc-js-util.mapdeletefromset.md)
## mapDeleteFromSet() function
Used with maps that store sets. Where a set exists for a given key the value will be removed from that set.
**Signature:**
```typescript
export declare function mapDeleteFromSet<TKey, TValue>(map: Map<TKey, ISetLike<TValue>>, key: TKey, value: TValue): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
map
</td><td>
Map<TKey, [ISetLike](./rc-js-util.isetlike.md)<!-- --><TValue>>
</td><td>
The `Map` to check. May be modified.
</td></tr>
<tr><td>
key
</td><td>
TKey
</td><td>
The key to lookup in `map`<!-- -->.
</td></tr>
<tr><td>
value
</td><td>
TValue
</td><td>
The value to remove.
</td></tr>
</tbody></table>
**Returns:**
boolean
true - If value was removed.
## Remarks
See [mapDeleteFromSet()](./rc-js-util.mapdeletefromset.md)<!-- -->.