UNPKG

@tsdotnet/collection-base

Version:

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/tsdotnet/collection-base/blob/master/LICENSE) ![npm-publish](https://github.com/tsdotnet/collection-base/workflows/npm-publish/badge.svg) [![npm ve

22 lines (16 loc) 458 B
/*! * @author electricessence / https://github.com/electricessence/ * @license MIT */ import ReadOnlyCollection from './ReadOnlyCollection'; /** * Interface for implementing an externally modifiable collection. */ export default interface Collection<T> extends ReadOnlyCollection<T> { add (entry: T): this; addEntries (entries: Iterable<T>): number; remove (entry: T, max?: number): number; // Number of times removed. clear (): number; }