import Vue from 'vue' ; class EventBus { private bus = new Vue ( ) ; public on ( event , callback ) { this . bus . $on ( event , callback ) ; } public off ( event , callback ) { this . bus . $off ( event , callback ) ; } public once ( event , callback ) { this . bus . $once ( event , callback ) ; } public emit ( event , payload ? ) { this . bus . $emit ( event , payload ) ; } } export default new EventBus ( ) ;