UNPKG

async-promise

Version:

Asynchronous coordination primitives for JavaScript and TypeScript

31 lines (30 loc) 966 B
export declare class LinkedListNode<T> { value: T; private _list; private _previous; private _next; constructor(value?: T); /** Gets the LinkedList for this node */ list: LinkedList<T>; /** Gets the previous node in the list */ previous: LinkedListNode<T>; /** Gets the next node in the list */ next: LinkedListNode<T>; } export declare class LinkedList<T> { private _head; private _size; /** Gets the first node in the list */ first: LinkedListNode<T>; /** Gets the last node in the list */ last: LinkedListNode<T>; /** Gets the size of the list */ size: number; insert(afterNode: LinkedListNode<T>, newNode: LinkedListNode<T>): void; push(newNode: LinkedListNode<T>): void; pop(): LinkedListNode<T>; shift(): LinkedListNode<T>; unshift(newNode: LinkedListNode<T>): void; delete(node: LinkedListNode<T>): boolean; clear(): void; }