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 • 796 B
TypeScript
/**
* @public
* Used with maps that store arrays. Where an array exists for a given key the values will be removed from that array.
* @param map - The `Map` to check. May be modified.
* @param key - The key to lookup in `map`.
* @param itemsToRemove - The values to remove.
* @returns The number of items that were removed.
*
* @remarks
* See {@link (mapRemoveManyFromArray: 1)}.
*/
export declare function mapRemoveManyFromArray<TKey, TValue>(map: Map<TKey, TValue[]>, key: TKey, itemsToRemove: TValue[]): number;
/**
* @public
* {@inheritDoc (mapRemoveManyFromArray: 1)}
*/
export declare function mapRemoveManyFromArray<TKey extends object, TValue>(map: WeakMap<TKey, TValue[]>, key: TKey, itemsToRemove: TValue[]): number;
//# sourceMappingURL=map-remove-many-from-array.d.ts.map