UNPKG

typescript-ds-lib

Version:

A collection of TypeScript data structure implementations

19 lines (18 loc) 512 B
export declare abstract class BaseCollection<T> { /** * Checks if the collection is empty. Returns true if the collection is empty, false otherwise. */ abstract isEmpty(): boolean; /** * Returns the number of elements in the collection. */ abstract size(): number; /** * Removes all elements from the collection. */ abstract clear(): void; /** * Checks if two collections are equal. */ abstract equals(other: BaseCollection<T>): boolean; }