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.
18 lines • 753 B
TypeScript
/**
* @public
* Used with maps that store arrays. Where an array exists for a given key the value will be removed from that array.
* @param map - The `Map` to check. May be modified.
* @param key - The key to lookup in `map`.
* @param value - The value to remove.
* @returns true - If value was removed.
*
* @remarks
* See {@link (mapRemoveOneFromArray: 1)}.
*/
export declare function mapRemoveOneFromArray<TKey, TValue>(map: Map<TKey, TValue[]>, key: TKey, value: TValue): boolean;
/**
* @public
* {@inheritDoc (mapRemoveOneFromArray: 1)}
*/
export declare function mapRemoveOneFromArray<TKey extends object, TValue>(map: WeakMap<TKey, TValue[]>, key: TKey, value: TValue): boolean;
//# sourceMappingURL=map-remove-one-from-array.d.ts.map