devonthesofa_obsidian-note-.../types/eventBus.ts
2025-11-21 12:51:08 +01:00

27 lines
706 B
TypeScript

import {
MultipleNoteStatusService,
NoteStatusService,
} from "@/core/noteStatusService";
import { PluginSettings } from "@/types/pluginSettings";
import { TFile, WorkspaceLeaf } from "obsidian";
export type EventBusEvents = {
"active-file-change": ({ leaf }: { leaf: WorkspaceLeaf | null }) => void;
"plugin-settings-changed": ({
key,
value,
currentSettings,
}: {
key: keyof PluginSettings;
value: unknown;
currentSettings: PluginSettings;
}) => void;
"status-changed": ({ file }: { file: TFile }) => void;
"triggered-open-modal": ({
statusService,
}: {
statusService: NoteStatusService | MultipleNoteStatusService;
}) => void;
};
export type EventName = keyof EventBusEvents;