Rocket.Chat.ReactNative/app/containers/MessageComposer/emitter.ts

15 lines
259 B
TypeScript
Raw Normal View History

2024-01-25 14:11:07 +00:00
import mitt from 'mitt';
import { TMarkdownStyle } from './interfaces';
type Events = {
toolbarMention: undefined;
addMarkdown: {
style: TMarkdownStyle;
};
};
export const emitter = mitt<Events>();
emitter.on('*', (type, e) => console.log(type, e));