Skip to content

Commit 71d5b29

Browse files
committed
Loosen the type definiion on Database.setAppState
Code already handles each property separately so there's no reason to force passing the whole object.
1 parent b8d0d84 commit 71d5b29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/Database.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export default class Database {
259259
return state;
260260
}
261261

262-
async setAppState(appState: AppState) {
262+
async setAppState(appState: Partial<AppState>) {
263263
if (appState.defaultNotificationUrl)
264264
await this.put("Options", { key: "defaultUrl", value: appState.defaultNotificationUrl });
265265
if (appState.defaultNotificationTitle || appState.defaultNotificationTitle === "")
@@ -525,7 +525,7 @@ export default class Database {
525525
return await Database.singletonInstance.getServiceWorkerState();
526526
}
527527

528-
static async setAppState(appState: AppState) {
528+
static async setAppState(appState: Partial<AppState>) {
529529
return await Database.singletonInstance.setAppState(appState);
530530
}
531531

0 commit comments

Comments
 (0)