mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
17 lines
403 B
TypeScript
17 lines
403 B
TypeScript
import mitt from "mitt";
|
|
import type { Status } from "~/types/mastodon/status";
|
|
|
|
type ApplicationEvents = {
|
|
"note:reply": Status;
|
|
"note:delete": Status;
|
|
"note:edit": Status;
|
|
"composer:open": undefined;
|
|
"composer:send": Status;
|
|
"composer:close": undefined;
|
|
};
|
|
|
|
const emitter = mitt<ApplicationEvents>();
|
|
|
|
export const useEvent = emitter.emit;
|
|
export const useListen = emitter.on;
|