Skip to content

Commit c225770

Browse files
committed
Add some TODOs so we don't forget to do this.
1 parent 4bc6942 commit c225770

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/features/GetCommands.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import * as vscode from "vscode";
55
import { LanguageClient, RequestType } from "vscode-languageclient";
66
import { IFeature } from "../feature";
77

8+
// TODO: Document this export: https://github.com/PowerShell/vscode-powershell/pull/1406#discussion_r209325655
9+
// TODO: Also use something other than any if possible... We may have already addressed this with a previous attempt.
810
export const GetAllCommandsRequestType = new RequestType<any, any, void, void>("powerShell/getAllCommands");
911

1012
export class GetCommandsFeature implements IFeature {
@@ -18,6 +20,7 @@ export class GetCommandsFeature implements IFeature {
1820
// TODO: Log error message
1921
return;
2022
}
23+
// TODO: Refactor network code out of constructor
2124
this.languageClient.sendRequest(GetAllCommandsRequestType, "").then((result) => {
2225
this.commandsExplorerProvider.powerShellCommands = result.map(toCommand);
2326
this.commandsExplorerProvider.refresh();
@@ -69,6 +72,7 @@ class CommandsExplorerProvider implements vscode.TreeDataProvider<Command> {
6972

7073
}
7174

75+
// TODO: Define and export an ICommand interface to describe the properties we require.
7276
function toCommand(command: any): Command {
7377
return new Command(
7478
command.name,
@@ -100,5 +104,6 @@ class Command extends vscode.TreeItem {
100104

101105
public async getChildren(element): Promise<Command[]> {
102106
return [];
107+
// TODO: Determine why we're returning an empty array... I think it's because we have to return something and we're not actually using the tree view part just yet...
103108
}
104109
}

0 commit comments

Comments
 (0)