Skip to content

Commit

Permalink
Add doc to resolveTreeItem
Browse files Browse the repository at this point in the history
Part of #100741
  • Loading branch information
alexr00 committed Nov 17, 2020
1 parent 0c2c8dd commit 171a21b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/vs/vscode.proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,16 @@ declare module 'vscode' {

// https://github.com/microsoft/vscode/issues/100741
export interface TreeDataProvider<T> {
/**
* Called only on hover to resolve the TreeItem2#tooltip property if it is undefined.
* Only properties that were undefined can be resolved in `resolveTreeItem`.
* Will only ever be called once per TreeItem.
* Functionality may be expanded later to include being called to resolve other missing
* properties on selection and/or on open.
*
* @param element
* @param item Undefined properties of `item` should be set then `item` should be returned.
*/
resolveTreeItem?(element: T, item: TreeItem2): TreeItem2 | Thenable<TreeItem2>;
}

Expand Down

0 comments on commit 171a21b

Please sign in to comment.