type LinkedListType = (typeof LinkedList.Type)[keyof typeof LinkedList.Type];
/**
 * JavaScript implementation of a LinkedList.
 *
 * @template E
 * @type {LinkedList<E>}
 */
declare class LinkedList<E> {
    private $head;
    private $tail;
    private $size;
    private $doublyLinked;
    static Type: {
        readonly Singly: "singly";
        readonly Doubly: "doubly";
    };
    /**
     * Creates a new LinkedList.
     *
     * @param {LinkedListType} type The type of the list ('singly' or 'doubly' linked).
     */
    constructor(type?: LinkedListType);
    /**
     * Adds an element to the start of the list.
     *
     * @param {E} value The element to add.
     * @returns {void}
     */
    addFirst(value: E): void;
    /**
     * Adds an element to the end of the list.
     *
     * @param {E} value The element to add.
     * @returns {void}
     */
    addLast(value: E): void;
    /**
     * Gets the first node in the list.
     *
     * @returns {E|null} The first node in the list, or null if the list is empty.
     */
    getFirst(): E | null;
    /**
     * Gets the last node in the list.
     *
     * @returns {E|null} The last node in the list, or null if the list is empty.
     */
    getLast(): E | null;
    /**
     * Removes the first element from the list.
     *
     * @returns {E | null} The removed element, or null if the list was empty.
     */
    removeFirst(): E | null;
    /**
     * Removes the last element from the list.
     *
     * @returns {E | null} The removed element, or null if the list was empty.
     */
    removeLast(): E | null;
    /**
     * Removes the first occurrence of an element from the list.
     *
     * @param {E} value The element to remove.
     * @returns {E|null} The removed element, or null if the element was not found.
     */
    remove(value: E): E | null;
    /**
     * Gets the value of the node at the specified index.
     *
     * @param {number} index The index of the element to remove.
     * @returns {E|null} The removed element, or null if the index was out of bounds.
     */
    get(index: number): E | null;
    /**
     * Sets the value of the node at the specified index.
     * Replaces the value of the node at the specified index with the specified value.
     *
     * @param {number} index The index of the element to set.
     * @param {E} value The new value of the element.
     * @returns {void}
     * @throws {RangeError} If the index is out of bounds.
     */
    set(index: number, value: E): void;
    /**
     * Inserts an element at the specified index.
     * Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
     * If the index is equal to the size of the list, the element is added to the end of the list.
     * If the index is 0, the element is added to the start of the list.
     * Otherwise, the element is inserted at the specified index.
     *
     * @param {number} index The index at which to insert the element.
     * @param {E} value The element to insert.
     * @returns {void}
     * @throws {RangeError} If the index is out of bounds.
     */
    insert(index: number, value: E): void;
    /**
     * Checks if the list contains the specified element.
     *
     * @param {E} value The element to check for.
     * @returns {boolean} True if the list contains the element, false otherwise.
     */
    contains(value: E): boolean;
    /**
     * Reverses the list.
     * The first element becomes the last, and the last element becomes the first.
     * This method runs in linear time.
     *
     * @returns {void}
     */
    reverse(): void;
    /**
     * Removes all elements from the list.
     * The list will be empty after this call returns.
     * This method runs in linear time.
     *
     * @returns {void}
     */
    clear(): void;
    /**
     * Checks if the list is empty.
     *
     * @returns {boolean} True if the list is empty, false otherwise.
     */
    isEmpty(): boolean;
    /**
     * Gets the index of the value in the list.
     * If the value is not found, -1 is returned.
     * If the value is found multiple times, the index of the first occurrence is returned.
     * This method runs in linear time.
     *
     * @param {E} value The value to search for.
     * @returns {number} The index of the value in the list, or -1 if the value is not found.
     */
    indexOf(value: E): number;
    /**
     * Iterates over the list and calls the specified consumer function for each element.
     * The consumer function is called with three arguments: the value of the element, the index of the element, and the list itself.
     *
     * @param {function(E, number, LinkedList<E>): void} consumer The consumer function to call for each element.
     * @param {Object} [context] The context to call the consumer function in.
     * @returns {void}
     */
    forEach(consumer: (arg0: E, arg1: number, arg2: LinkedList<E>) => void, context?: object): void;
    /**
     * Returns an iterator over the values in the list.
     * The values are returned in order from the first to the last element.
     * This method runs in constant time.
     * The returned iterator is fail-fast.
     * Modifying the list after getting the iterator, except through the iterator's own methods, will throw an error.
     *
     * @yields {Iterable<E>} An iterator over the values in the list.
     */
    values(): Generator<E, void, unknown>;
    /**
     * Gets the size of the list.
     *
     * @readonly
     * @returns {number} The size of the list.
     */
    get size(): number;
    /**
     * Gets an array containing all the values in the list.
     * The values are returned in order from the first to the last element.
     * This method runs in linear time.
     * The returned array is a shallow copy of the list.
     * Modifying the array will not modify the list.
     *
     * @returns {E[]} An array containing all the values in the list.
     */
    toArray(): E[];
    /**
     * Returns an iterator over the values in the list.
     * The values are returned in order from the first to the last element.
     * This method runs in constant time.
     * The returned iterator is fail-fast.
     * Modifying the list after getting the iterator, except through the iterator's own methods, will throw an error.
     * The iterator does not support modifying the list during iteration.
     * This method is called when the list is used in a for-of loop.
     *
     * @yields {Iterable<E>} An iterator over the values in the list.
     * @example
     * ````js
     * for (const value of list) {
     * 	 console.log(value);
     * }
     * ````
     */
    [Symbol.iterator](): Generator<E, void, unknown>;
    /**
     * Returns a string description of the list.
     *
     * @returns {string} A string description of the list.
     */
    get [Symbol.toStringTag](): string;
    /**
     * Gets the node at the specified index.
     * If the index is out of bounds, null is returned.
     *
     * @private
     * @param {number} index The index of the node to get.
     * @returns {Node<E>} The node at the specified index, or null if the index is out of bounds.
     */
    private getNodeAt;
    /**
     * Removes a node from the list.
     *
     * @private
     * @param {Node<E>} node The node to remove.
     * @returns {E} The value of the removed node.
     */
    private removeNode;
}

export { LinkedList };
