Fix types

This commit is contained in:
vorotamoroz
2026-06-19 07:52:04 +01:00
parent b2c6916ac7
commit 42954fcf68
23 changed files with 219 additions and 111 deletions
+5 -3
View File
@@ -50,7 +50,7 @@ const DEFAULT_SETTINGS: Partial<ObsidianLiveSyncSettings> = {
class LiveSyncWebApp {
private rootHandle: FileSystemDirectoryHandle;
private core: LiveSyncBaseCore<ServiceContext, any> | null = null;
private core: LiveSyncBaseCore<ServiceContext, never> | null = null;
private serviceHub: BrowserServiceHub<ServiceContext> | null = null;
constructor(rootHandle: FileSystemDirectoryHandle) {
@@ -107,7 +107,7 @@ class LiveSyncWebApp {
});
// Create LiveSync core
this.core = new LiveSyncBaseCore(
this.core = new LiveSyncBaseCore<ServiceContext, never>(
this.serviceHub,
(core, serviceHub) => {
return initialiseServiceModulesFSAPI(this.rootHandle, core, serviceHub);
@@ -127,7 +127,7 @@ class LiveSyncWebApp {
// new ModuleReplicatorP2P(core), // Register P2P replicator for CLI (useP2PReplicator is not used here)
new SetupManager(core),
],
() => [], // No add-ons
() => [] as never[], // No add-ons
(core) => {
useOfflineScanner(core);
useRedFlagFeatures(core);
@@ -205,6 +205,7 @@ class LiveSyncWebApp {
}
// Scan the directory to populate file cache
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Accessing private service modules
const fileAccess = (this.core as any)._serviceModules?.storageAccess?.vaultAccess;
if (fileAccess?.fsapiAdapter) {
console.log("[Scanning] Scanning vault directory...");
@@ -223,6 +224,7 @@ class LiveSyncWebApp {
console.log("[Shutdown] Shutting down...");
// Stop file watching
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Accessing private service modules
const storageEventManager = (this.core as any)._serviceModules?.storageAccess?.storageEventManager;
if (storageEventManager?.cleanup) {
await storageEventManager.cleanup();