diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index c595e1876e849..7de4a9865802d 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1028,7 +1028,7 @@ declare module 'vscode' { * @param element * @param item Undefined properties of `item` should be set then `item` should be returned. */ - resolveTreeItem?(element: T, item: TreeItem2): TreeItem2 | Thenable; + resolveTreeItem?(item: TreeItem2, element: T): ProviderResult; } export class TreeItem2 extends TreeItem { diff --git a/src/vs/workbench/api/common/extHostTreeViews.ts b/src/vs/workbench/api/common/extHostTreeViews.ts index dfbc29ebbdc54..af3a31890f2ca 100644 --- a/src/vs/workbench/api/common/extHostTreeViews.ts +++ b/src/vs/workbench/api/common/extHostTreeViews.ts @@ -379,7 +379,7 @@ class ExtHostTreeView extends Disposable { if (element) { const node = this.nodes.get(element); if (node) { - const resolve = await this.dataProvider.resolveTreeItem(element, node.extensionItem); + const resolve = await this.dataProvider.resolveTreeItem(node.extensionItem, element) ?? node.extensionItem; // Resolvable elements. Currently only tooltip. node.item.tooltip = this.getTooltip(resolve.tooltip); return node.item;