Simplify types on TreeDataProvider methods

This commit is contained in:
Robert
2023-05-16 16:55:52 +01:00
parent 9ce95a3554
commit b0371b5075

View File

@@ -32,9 +32,7 @@ export class QueryTreeDataProvider
* @param item The item to represent.
* @returns The UI presentation of the item.
*/
public getTreeItem(
item: QueryTreeViewItem,
): vscode.TreeItem | Thenable<vscode.TreeItem> {
public getTreeItem(item: QueryTreeViewItem): vscode.TreeItem {
return item;
}
@@ -43,9 +41,7 @@ export class QueryTreeDataProvider
* @param item The item to expand.
* @returns The children of the item.
*/
public getChildren(
item?: QueryTreeViewItem,
): vscode.ProviderResult<QueryTreeViewItem[]> {
public getChildren(item?: QueryTreeViewItem): QueryTreeViewItem[] {
if (!item) {
// We're at the root.
return this.queryTreeItems;