1
0
silverbullet/webapp/app_event.ts
2022-03-29 12:13:46 +02:00

19 lines
345 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<void>;
}