1
0
silverbullet/webapp/app_event.ts

19 lines
345 B
TypeScript
Raw Normal View History

2022-03-28 13:25:05 +00:00
export type AppEvent = "page:click" | "editor:complete";
export type ClickEvent = {
2022-03-28 13:25:05 +00:00
page: string;
pos: number;
metaKey: boolean;
ctrlKey: boolean;
altKey: boolean;
};
export type IndexEvent = {
name: string;
text: string;
};
export interface AppEventDispatcher {
2022-03-29 10:13:46 +00:00
dispatchAppEvent(name: AppEvent, data?: any): Promise<void>;
}