Skip to content

Commit

Permalink
types: add mitt types
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Oct 13, 2021
1 parent ea97cb2 commit 80328d2
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/utils/mitt.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
import type { Emitter } from "mitt";
import mitt from "mitt";

export const emitter: Emitter = mitt();
type Events = {
resize: {
detail: {
width: number;
height: number;
};
};
openPanel: string;
tagViewsChange: string;
tagViewsShowModel: string;
logoChange: string;
changLayoutRoute: {
indexPath: string;
parentPath: string;
};
};

export const emitter: Emitter<Events> = mitt<Events>();

0 comments on commit 80328d2

Please sign in to comment.