Use unknown return type for callbacks

This commit is contained in:
Andras Schmelczer 2025-08-17 15:12:31 +01:00
parent e73f147fbc
commit 81b81e30ff
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
16 changed files with 95 additions and 76 deletions

View file

@ -331,6 +331,8 @@ export class Database {
),
lastSeenUpdateId: this.lastSeenUpdateIds.min,
hasInitialSyncCompleted: this.hasInitialSyncCompleted
}).catch((error: unknown) => {
this.logger.error(`Error saving data: ${error}`);
});
}

View file

@ -28,7 +28,7 @@ export class Settings {
private readonly onSettingsChangeHandlers: ((
newSettings: SyncSettings,
oldSettings: SyncSettings
) => void)[] = [];
) => unknown)[] = [];
public constructor(
private readonly logger: Logger,
@ -50,7 +50,7 @@ export class Settings {
}
public addOnSettingsChangeListener(
handler: (settings: SyncSettings, oldSettings: SyncSettings) => void
handler: (settings: SyncSettings, oldSettings: SyncSettings) => unknown
): void {
this.onSettingsChangeHandlers.push(handler);
}