import { emitter } from './events' ; import { NotificationsOptions } from './types' ; export const notify = ( args ) : void => { if ( typeof args === 'string' ) { args = { title : '' , text : args } ; } if ( typeof args === 'object' ) { emitter . emit ( 'add' , args ) ; } } ; notify . close = function ( id ) : void { emitter . emit ( 'close' , id ) ; } ;