/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
export interface ListNode<T> {
    readonly list: List<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 List<T> implements Iterable<ListNode<T>>, Partial<ListNodeRange<T>>, Pick<ListNode<T>[], "pop" | "shift" | "length" | "includes"> {
    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>;
    shift(): ListNode<T> | undefined;
    unshift(...items: T[]): ListNodeRange<T>;
    includes(node: ListNode<T> | undefined): node is ListNode<T>;
    private _includes;
    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: List<T>, visitor: (node: ListNode<T>) => boolean | void, start?: ListNode<T>, forward?: boolean): boolean;
//# sourceMappingURL=list.d.ts.map