import { DataSourceStateMachine } from './' ; import { MqttMessage } from '../../../events' ; type MessageCallback = ( topic : string , payload : Buffer , packet : any ) => void ; interface DataSource < DataSourceOptions > { topicSeparator : string ; stateMachine : DataSourceStateMachine ; connect ( options ) : DataSourceStateMachine ; disconnect ( ) : void ; onMessage ( messageCallback ) : void ; publish ( msg ) : void ; } export { DataSource , MessageCallback } ;