13 lines
208 B
TypeScript
13 lines
208 B
TypeScript
|
import mitt from "mitt";
|
||
|
|
||
|
type NotifyEvents = {
|
||
|
notification: Notification;
|
||
|
};
|
||
|
|
||
|
export interface Notification {
|
||
|
content: string;
|
||
|
level?: "info" | "error";
|
||
|
}
|
||
|
|
||
|
export const notify = mitt<NotifyEvents>();
|