vault-link/frontend/sync-client/src/sync-operations/file-change-notifier.ts

12 lines
397 B
TypeScript

import type { RelativePath } from "../persistence/database";
import { EventListeners } from "../utils/data-structures/event-listeners";
export class FileChangeNotifier {
public readonly onFileChanged = new EventListeners<
(filePath: RelativePath) => unknown
>();
public notifyOfFileChange(filePath: RelativePath): void {
this.onFileChanged.trigger(filePath);
}
}