import { Subscription } from '../events/event-emitters' ; import { BridgeConnection } from './bridge-connection.interface' ; import { BridgeMessage } from './bridge-message.interface' ; export class Bridge { constructor ( private connection ) { } public send ( message ) { this . connection . send ( message ) ; } public listen ( handleIncomingMessage ) { return this . connection . listen ( handleIncomingMessage ) ; } }