import EventEmitter from 'eventemitter3' ; type CategoricalChartState = import ( '../chart/generateCategoricalChart' ) . CategoricalChartState ; interface EventCenter extends EventEmitter < EventTypes > { setMaxListeners ? ( maxListeners ) : void ; _maxListeners ? : number ; } const eventCenter = new EventEmitter ( ) ; if ( eventCenter . setMaxListeners ) { eventCenter . setMaxListeners ( 10 ) ; } export { eventCenter } ; export const SYNC_EVENT = 'recharts.syncMouseEvents' ; type SYNC_EVENT = typeof SYNC_EVENT ; interface EventTypes { [ SYNC_EVENT ] ( syncId , uniqueChartId , data ) : void ; }