about summary refs log tree commit diff
path: root/src/state/persisted/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/persisted/types.ts')
-rw-r--r--src/state/persisted/types.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/state/persisted/types.ts b/src/state/persisted/types.ts
index 95852f796..fd39079bf 100644
--- a/src/state/persisted/types.ts
+++ b/src/state/persisted/types.ts
@@ -4,6 +4,9 @@ export type PersistedApi = {
   init(): Promise<void>
   get<K extends keyof Schema>(key: K): Schema[K]
   write<K extends keyof Schema>(key: K, value: Schema[K]): Promise<void>
-  onUpdate(_cb: () => void): () => void
+  onUpdate<K extends keyof Schema>(
+    key: K,
+    cb: (v: Schema[K]) => void,
+  ): () => void
   clearStorage: () => Promise<void>
 }