UNPKG

@shopify/app-bridge

Version:

**Shopify is doubling our engineering staff in 2021! [Join our team and work on libraries like this one.](https://smrtr.io/5GGrc)**

16 lines (15 loc) 611 B
/** * Add an item to a collection, return a function that can then be used to * remove the item from the collection. Optionally accepting a callback that is * invoked when the item is removed from the collection. * * @internal */ export declare function addAndRemoveFromCollection<T>(collection: T[], item: T, then?: Function): () => boolean; /** * Remove the item from the collection. Optionally accepting a callback that is * invoked when the item is removed from the collection. * * @internal */ export declare function removeFromCollection<T>(collection: T[], item: T, then?: Function): boolean;