@kkdev92/vscode-ext-kit - v4.1.1
    Preparing search index...

    Interface TreeDataSource<T>

    Where a tree view's rows come from.

    The vscode-free counterpart of vscode.TreeDataProvider: the adapter wraps one of these into the platform's shape, so a provider never imports vscode and a test can drive it directly.

    interface TreeDataSource<T> {
        dispose?(): void;
        getChildren(element?: T): T[] | Promise<T[]>;
        getParent?(element: T): T | Promise<T | undefined> | undefined;
        getTreeItem(element: T): TreeItemLike;
        onDidChangeTreeData?(
            listener: (element: T | undefined) => void,
        ): PlatformRegistration;
        reportCheckboxChange?(
            changes: readonly { checked: boolean; element: T }[],
        ): void;
    }

    Type Parameters

    • T

    Implemented by

    Index
    • The children of an element, or the roots when none is given.

      Parameters

      • Optionalelement: T

      Returns T[] | Promise<T[]>

    • The parent of an element. Required for reveal to work.

      Parameters

      • element: T

      Returns T | Promise<T | undefined> | undefined

    • Called by the adapter when the user toggles checkboxes in the view.

      Parameters

      • changes: readonly { checked: boolean; element: T }[]

      Returns void