Skip to content

Commit

Permalink
fix: Fixed exported types
Browse files Browse the repository at this point in the history
  • Loading branch information
samwx committed Sep 30, 2019
1 parent d5932f4 commit 55b2c7e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lime-js.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,16 @@ declare module "lime-js" {
interface SessionChannel extends SessionListener {
sendSession(session: Session): void;
}
abstract class Channel implements MessageChannel, CommandChannel, NotificationChannel, SessionChannel {
interface CommandProcessor extends CommandListener {
processCommand(command: Command, timeout: number): Promise<any>;
}
abstract class Channel implements MessageChannel, CommandChannel, NotificationChannel, SessionChannel, CommandProcessor {
transport: Transport;
remoteNode: string;
localNode: string;
sessionId: string;
state: SessionState;
commandTimeout: number;

constructor(transport: Transport, autoReplyPings: boolean, autoNotifyReceipt: boolean);

Expand All @@ -207,6 +211,8 @@ declare module "lime-js" {

sendSession(session: Session): void;
abstract onSession(message: Session): void;

processCommand(command: Command, timeout: number): Promise<any>;
}
// Lime.Client.ClientChannel
class ClientChannel extends Channel {
Expand Down
1 change: 1 addition & 0 deletions src/Lime/Lime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export
, CommandChannel
, NotificationChannel
, SessionChannel
, CommandProcessor
} from "./Protocol/Client/Channel";
export { default as ClientChannel } from "./Protocol/Client/ClientChannel";

Expand Down
2 changes: 1 addition & 1 deletion src/Lime/Protocol/Client/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface SessionChannel extends SessionListener {
}

export interface CommandProcessor extends CommandListener {
processCommand(command: Command): Promise<any>;
processCommand(command: Command, timeout: number): Promise<any>;
}

abstract class Channel implements MessageChannel, CommandChannel, NotificationChannel, SessionChannel, CommandProcessor {
Expand Down

0 comments on commit 55b2c7e

Please sign in to comment.