export type LinkedListElement = { next?: T; prev?: T; }; /** * Class implements bidirectional non-circular linked list.
* LinkedListElement - object of any type that has properties next and prev. */ declare class LinkedList> { first: T; last: T; constructor(first?: T, last?: T); [Symbol.iterator](): { next: () => { value: any; done: boolean; }; }; /** * Return number of elements in the list */ get size(): number; /** * Return array of elements from start to end, * If start or end not defined, take first as start, last as end */ toArray(start?: any, end?: any): any[]; /** * Append new element to the end of the list */ append(element: T): this; /** * Insert new element to the list after elementBefore */ insert(newElement: T, elementBefore: T): this; /** * Remove element from the list */ remove(element: T): this; /** * Return true if list is empty */ isEmpty(): boolean; /** * Throw an error if circular loop detected in the linked list * @param first element to start iteration * @throws {Errors.INFINITE_LOOP} */ static testInfiniteLoop(first: LinkedListElement): void; } export default LinkedList; //# sourceMappingURL=linked_list.d.ts.map