import { Box } from "./box"; /** Doubly Linked List */ export declare class Linked implements Iterable { /** Create linked list from iterator */ static from(iter: Iterable): Linked; /** Create linked list from params */ static of(...items: T[]): Linked; /** The first node of the linked list * unsafe field */ head?: LinkedNode; /** The last node of the linked list * unsafe field */ last?: LinkedNode; /** Check if the linked list is empty */ get isEmpty(): boolean; /** Check if there is only one item in the linked list */ get onlyOne(): boolean; /** Get the length of the linked list */ get size(): number; /** Get the length of the linked list */ get length(): number; /** Get an iterator to traverse the list items */ [Symbol.iterator](): Iterator; /** Get an iterator to traverse the list items */ items(): IterableIterator; /** Get an iterator that traverses the list items in reverse */ backItems(): IterableIterator; /** Get an iterator to traverse the list nodes */ nodes(): IterableIterator>; /** Get an iterator that traverses the list nodes in reverse */ backNodes(): IterableIterator>; /** Clear list items */ clear(): void; /** Add an item to the end of the linked list */ push(val: T): LinkedNode; /** Add many items to the end of the linked list */ push(...vals: T[]): void; /** Add many nodes to the end of the linked list * unsafe method, will not verify the node */ pushNode(...nodes: LinkedNode[]): void; /** Add an item to the head of the linked list */ unshift(val: T): void; /** Add many items to the head of the linked list */ unshift(...vals: T[]): void; /** Add many nodes to the head of the linked list * unsafe method, will not verify the node */ unshiftNode(...nodes: LinkedNode[]): void; /** Remove an item from the end of the list */ pop(): T | undefined; /** Remove a node from the end of the linked list */ popNode(): LinkedNode | undefined; /** Remove an item from the head of the list */ shift(): T | undefined; /** Remove a node from the head of the list */ shiftNode(): LinkedNode | undefined; /** After adding an item to a node * unsafe method, will not verify the node */ addAfter(target: LinkedNode, val: T): void; /** After adding a node to a node * unsafe method, will not verify the node */ addAfterNode(target: LinkedNode, node: LinkedNode): void; /** Before adding an item to a node * unsafe method, will not verify the node */ addBefore(target: LinkedNode, val: T): void; /** Before adding a node to a node * unsafe method, will not verify the node */ addBeforeNode(target: LinkedNode, node: LinkedNode): void; /** Remove a node from the linked list * unsafe method, will not verify the node */ remove(target: LinkedNode): LinkedNode | undefined; } /** Linked list node */ export declare class LinkedNode implements Box { val: T; prev?: LinkedNode | undefined; next?: LinkedNode | undefined; constructor(/** Value in node */ val: T, /** Previous node */ prev?: LinkedNode | undefined, /** Next node */ next?: LinkedNode | undefined); }