1
0
silverbullet/webapp/app_event.ts
2022-03-28 15:25:05 +02:00

19 lines
346 B
TypeScript

export type AppEvent = "page:click" | "editor:complete";
export type ClickEvent = {
page: string;
pos: number;
metaKey: boolean;
ctrlKey: boolean;
altKey: boolean;
};
export type IndexEvent = {
name: string;
text: string;
};
export interface AppEventDispatcher {
dispatchAppEvent(name: AppEvent, data?: any): Promise<any[]>;
}