提交 f6481317 编写于 作者: D Dirk Baeumer

Fixing new compile error detected by 2.0 compiler

上级 7a560086
......@@ -59,7 +59,7 @@ enum State {
}
export interface IChannel {
call(command: string, arg: any): TPromise<any>;
call(command: string, arg?: any): TPromise<any>;
}
export interface IChannelServer {
......
......@@ -13,7 +13,7 @@ import Event, { buffer } from 'vs/base/common/event';
export interface IWindowsChannel extends IChannel {
call(command: 'event:onNewWindowOpen'): TPromise<number>;
call(command: 'event:onWindowFocus'): TPromise<number>;
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);
......
......@@ -11,7 +11,7 @@ import { IChoiceService, Severity } from 'vs/platform/message/common/message';
export interface IChoiceChannel extends IChannel {
call(command: 'choose'): TPromise<number>;
call(command: string, arg: any): TPromise<any>;
call(command: string, arg?: any): TPromise<any>;
}
export class ChoiceChannel implements IChoiceChannel {
......@@ -19,7 +19,7 @@ export class ChoiceChannel implements IChoiceChannel {
constructor(private service: IChoiceService) {
}
call(command: string, args: any): TPromise<any> {
call(command: string, args?: any): TPromise<any> {
switch (command) {
case 'choose': return this.service.choose(<Severity>args[0], <string>args[1], <string[]>args[2]);
}
......
......@@ -80,7 +80,7 @@ export class Adapter {
this.aiKey = rawAdapter.aiKey;
}
public getInitialConfigurations(): TPromise<string> {
public getInitialConfigurations(): TPromise<string | any[]> {
if (typeof this.initialConfigurations === 'string') {
// Contributed initialConfigurations is a command that needs to be invoked
// Debug adapter will dynamically provide the initial conifguraiton
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册