UNPKG

611 BTypeScriptView Raw
1/**
2 * Add an item to a collection, return a function that can then be used to
3 * remove the item from the collection. Optionally accepting a callback that is
4 * invoked when the item is removed from the collection.
5 *
6 * @internal
7 */
8export declare function addAndRemoveFromCollection<T>(collection: T[], item: T, then?: Function): () => boolean;
9/**
10 * Remove the item from the collection. Optionally accepting a callback that is
11 * invoked when the item is removed from the collection.
12 *
13 * @internal
14 */
15export declare function removeFromCollection<T>(collection: T[], item: T, then?: Function): boolean;