irclib/src/types/impl.interface.ts

16 lines
442 B
TypeScript

export interface IRCCommunicator {
emit(event: string, ...args: any[]): void;
on(event: string, handler: (...args: any[]) => void): void;
write(format: string, ...args: any[]): void;
}
export interface IRCConnector extends IRCCommunicator {
connected: boolean;
connect(): Promise<void>;
destroy(): Promise<void>;
}
export interface IRCConnectorConstructor {
new (secure: boolean, host: string, port?: number): IRCConnector;
}