/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
export interface ListNode<T> {
    readonly list: DoublyLinkedList<T> | undefined;
    readonly data: T;
    readonly next: ListNode<T> | undefined;
    readonly prev: ListNode<T> | undefined;
}
export interface ListNodeRange<T> {
    first: ListNode<T>;
    last: ListNode<T>;
}
export declare class DoublyLinkedList<T> implements Iterable<ListNode<T>>, Partial<ListNodeRange<T>>, Pick<ListNode<T>[], "pop" | "shift" | "length" | "includes"> {
    find(predicate: (value: ListNode<T>, obj: DoublyLinkedList<T>) => unknown): ListNode<T> | undefined;
    map<U>(callbackfn: (value: ListNode<T>) => U): Iterable<U>;
    insertAfter(preceding: ListNode<T>, ...items: T[]): ListNodeRange<T>;
    pop(): ListNode<T> | undefined;
    push(...items: T[]): ListNodeRange<T>;
    /**
     * Remove and return the first element
     */
    shift(): ListNode<T> | undefined;
    /**
     * Insert `items` at start of list
     */
    unshift(...items: T[]): ListNodeRange<T>;
    /**
     * Remove nodes starting at `start` until either the `end` node is reached
     * or until `count` nodes have been removed. Returns the removed nodes as
     * a separate linked list
     */
    splice(start: ListNode<T>, countOrEnd?: ListNode<T> | number): DoublyLinkedList<T>;
    includes(node: ListNode<T> | undefined): node is ListNode<T>;
    private _includes;
    private _remove;
    remove(node: ListNode<T> | undefined): ListNode<T> | undefined;
    [Symbol.iterator](): IterableIterator<ListNode<T>>;
    private _len;
    private readonly headNode;
    get length(): number;
    get empty(): boolean;
    get first(): ListNode<T> | undefined;
    get last(): ListNode<T> | undefined;
}
export declare function walkList<T>(list: DoublyLinkedList<T>, visitor: (node: ListNode<T>) => boolean | void, start?: ListNode<T>, forward?: boolean): boolean;
//# sourceMappingURL=list.d.ts.map