chore - ES6, use for-of instead of forEach

This commit is contained in:
Johannes Rieken
2020-06-12 16:16:41 +02:00
parent a1feacf5c4
commit 28cb90be8c
19 changed files with 75 additions and 97 deletions

View File

@@ -204,12 +204,12 @@ export class ExtHostCommands implements ExtHostCommandsShape {
$getContributedCommandHandlerDescriptions(): Promise<{ [id: string]: string | ICommandHandlerDescription }> {
const result: { [id: string]: string | ICommandHandlerDescription } = Object.create(null);
this._commands.forEach((command, id) => {
for (let [id, command] of this._commands) {
let { description } = command;
if (description) {
result[id] = description;
}
});
}
return Promise.resolve(result);
}
}