import mitt from 'mitt'; import { TMarkdownStyle } from '../../../containers/MessageComposer/interfaces'; export type TEmitterEvents = { toolbarMention: undefined; addMarkdown: { style: TMarkdownStyle; }; setKeyboardHeight: number; setKeyboardHeightThread: number; setComposerHeight: number; setComposerHeightThread: number; audioFocused: string; }; export type TKeyEmitterEvent = keyof TEmitterEvents; export const emitter = mitt(); emitter.on('*', (type, e) => console.log(type, e));