diff --git a/packages/core/src/browser/frontend-application-module.ts b/packages/core/src/browser/frontend-application-module.ts index 5aad42ea55905..90c08f1fa13b4 100644 --- a/packages/core/src/browser/frontend-application-module.ts +++ b/packages/core/src/browser/frontend-application-module.ts @@ -224,18 +224,18 @@ export const frontendApplicationModule = new ContainerModule((bind, unbind, isBo bind(ResourceContextKey).toSelf().inSingletonScope(); bind(CommonFrontendContribution).toSelf().inSingletonScope(); - [FrontendApplicationContribution, CommandContribution, KeybindingContribution, MenuContribution, ColorContribution].forEach(serviceIdentifier => - bind(serviceIdentifier).toService(CommonFrontendContribution) - ); + for (const identifier of [FrontendApplicationContribution, CommandContribution, KeybindingContribution, MenuContribution, ColorContribution]) { + bind(identifier).toService(CommonFrontendContribution); + } bind(QuickOpenService).toSelf().inSingletonScope(); bind(QuickInputService).toSelf().inSingletonScope(); bind(QuickTitleBar).toSelf().inSingletonScope(); bind(QuickCommandService).toSelf().inSingletonScope(); bind(QuickCommandFrontendContribution).toSelf().inSingletonScope(); - [CommandContribution, KeybindingContribution, MenuContribution].forEach(serviceIdentifier => - bind(serviceIdentifier).toService(QuickCommandFrontendContribution) - ); + for (const identifier of [CommandContribution, KeybindingContribution, MenuContribution]) { + bind(identifier).toService(QuickCommandFrontendContribution); + } bind(QuickPickService).to(QuickPickServiceImpl).inSingletonScope().onActivation(({ container }, quickPickService: QuickPickService) => { WebSocketConnectionProvider.createProxy(container, quickPickServicePath, quickPickService); diff --git a/packages/core/src/browser/keybinding.spec.ts b/packages/core/src/browser/keybinding.spec.ts index bb1b0f2f16283..684e259c58db6 100644 --- a/packages/core/src/browser/keybinding.spec.ts +++ b/packages/core/src/browser/keybinding.spec.ts @@ -69,9 +69,9 @@ before(async () => { bindContributionProvider(bind, KeybindingContribution); bind(TestContribution).toSelf().inSingletonScope(); - [CommandContribution, KeybindingContribution].forEach(serviceIdentifier => - bind(serviceIdentifier).toService(TestContribution) - ); + for (const identifier of [CommandContribution, KeybindingContribution]) { + bind(identifier).toService(TestContribution); + } bind(KeybindingContext).toConstantValue({ id: 'testContext', diff --git a/packages/editor/src/browser/editor-frontend-module.ts b/packages/editor/src/browser/editor-frontend-module.ts index 952fe1c8a8b73..6f065a7d101a0 100644 --- a/packages/editor/src/browser/editor-frontend-module.ts +++ b/packages/editor/src/browser/editor-frontend-module.ts @@ -68,9 +68,9 @@ export default new ContainerModule(bind => { bind(VariableContribution).to(EditorVariableContribution).inSingletonScope(); - [CommandContribution, KeybindingContribution, QuickOpenContribution].forEach(serviceIdentifier => { - bind(serviceIdentifier).toService(EditorContribution); - }); + for (const identifier of [CommandContribution, KeybindingContribution, QuickOpenContribution]) { + bind(identifier).toService(EditorContribution); + } bind(EditorQuickOpenService).toSelf().inSingletonScope(); bind(CurrentEditorAccess).toSelf().inSingletonScope(); diff --git a/packages/file-search/src/browser/file-search-frontend-module.ts b/packages/file-search/src/browser/file-search-frontend-module.ts index b603507d8e1c8..713b372c6a63c 100644 --- a/packages/file-search/src/browser/file-search-frontend-module.ts +++ b/packages/file-search/src/browser/file-search-frontend-module.ts @@ -28,9 +28,9 @@ export default new ContainerModule((bind: interfaces.Bind) => { }).inSingletonScope(); bind(QuickFileOpenFrontendContribution).toSelf().inSingletonScope(); - [CommandContribution, KeybindingContribution, QuickOpenContribution].forEach(serviceIdentifier => - bind(serviceIdentifier).toService(QuickFileOpenFrontendContribution) - ); + for (const identifier of [CommandContribution, KeybindingContribution, QuickOpenContribution]) { + bind(identifier).toService(QuickFileOpenFrontendContribution); + } bind(QuickFileOpenService).toSelf().inSingletonScope(); }); diff --git a/packages/preview/src/browser/preview-frontend-module.ts b/packages/preview/src/browser/preview-frontend-module.ts index 7dbabcbcde246..8997f646311d4 100644 --- a/packages/preview/src/browser/preview-frontend-module.ts +++ b/packages/preview/src/browser/preview-frontend-module.ts @@ -51,7 +51,7 @@ export default new ContainerModule(bind => { })).inSingletonScope(); bind(PreviewContribution).toSelf().inSingletonScope(); - [CommandContribution, MenuContribution, OpenHandler, FrontendApplicationContribution, TabBarToolbarContribution].forEach(serviceIdentifier => - bind(serviceIdentifier).toService(PreviewContribution) - ); + for (const identifier of [CommandContribution, MenuContribution, OpenHandler, FrontendApplicationContribution, TabBarToolbarContribution]) { + bind(identifier).toService(PreviewContribution); + } });