From f64813174abea6f4afaffec251b59d3f6a682d64 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Thu, 22 Sep 2016 16:38:53 +0200 Subject: [PATCH] Fixing new compile error detected by 2.0 compiler --- src/vs/base/parts/ipc/common/ipc.ts | 2 +- src/vs/code/common/windowsIpc.ts | 4 ++-- src/vs/platform/message/common/messageIpc.ts | 4 ++-- src/vs/workbench/parts/debug/node/debugAdapter.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/base/parts/ipc/common/ipc.ts b/src/vs/base/parts/ipc/common/ipc.ts index f1c1a301918..54a1a00926a 100644 --- a/src/vs/base/parts/ipc/common/ipc.ts +++ b/src/vs/base/parts/ipc/common/ipc.ts @@ -59,7 +59,7 @@ enum State { } export interface IChannel { - call(command: string, arg: any): TPromise; + call(command: string, arg?: any): TPromise; } export interface IChannelServer { diff --git a/src/vs/code/common/windowsIpc.ts b/src/vs/code/common/windowsIpc.ts index feec4bbd2be..c6a0f175fa1 100644 --- a/src/vs/code/common/windowsIpc.ts +++ b/src/vs/code/common/windowsIpc.ts @@ -13,7 +13,7 @@ import Event, { buffer } from 'vs/base/common/event'; export interface IWindowsChannel extends IChannel { call(command: 'event:onNewWindowOpen'): TPromise; call(command: 'event:onWindowFocus'): TPromise; - call(command: string, arg: any): any; + call(command: string, arg?: any): any; } export class WindowsChannel implements IWindowsChannel { @@ -26,7 +26,7 @@ export class WindowsChannel implements IWindowsChannel { this.onWindowFocus = buffer(service.onWindowFocus, true); } - call(command: string, args: any): any { + call(command: string, args?: any): any { switch (command) { case 'event:onNewWindowOpen': return eventToCall(this.onNewWindowOpen); diff --git a/src/vs/platform/message/common/messageIpc.ts b/src/vs/platform/message/common/messageIpc.ts index c36980b2eaf..e7e305efdfa 100644 --- a/src/vs/platform/message/common/messageIpc.ts +++ b/src/vs/platform/message/common/messageIpc.ts @@ -11,7 +11,7 @@ import { IChoiceService, Severity } from 'vs/platform/message/common/message'; export interface IChoiceChannel extends IChannel { call(command: 'choose'): TPromise; - call(command: string, arg: any): TPromise; + call(command: string, arg?: any): TPromise; } export class ChoiceChannel implements IChoiceChannel { @@ -19,7 +19,7 @@ export class ChoiceChannel implements IChoiceChannel { constructor(private service: IChoiceService) { } - call(command: string, args: any): TPromise { + call(command: string, args?: any): TPromise { switch (command) { case 'choose': return this.service.choose(args[0], args[1], args[2]); } diff --git a/src/vs/workbench/parts/debug/node/debugAdapter.ts b/src/vs/workbench/parts/debug/node/debugAdapter.ts index e01fcfee34c..8d41a5248af 100644 --- a/src/vs/workbench/parts/debug/node/debugAdapter.ts +++ b/src/vs/workbench/parts/debug/node/debugAdapter.ts @@ -80,7 +80,7 @@ export class Adapter { this.aiKey = rawAdapter.aiKey; } - public getInitialConfigurations(): TPromise { + public getInitialConfigurations(): TPromise { if (typeof this.initialConfigurations === 'string') { // Contributed initialConfigurations is a command that needs to be invoked // Debug adapter will dynamically provide the initial conifguraiton -- GitLab