Added separate class for syncing multiple preference fields with stores

This will make the sync code less boilerplate-y. Instead of manually
subscribing back and forth, this will be done inside the class in
correct order and in any amount.

Types are a bit wonky though.
This commit is contained in:
koloml committed 2026-08-30 11:52:07 +02:00
1 parent 38d84d0830
commit 34c0a11b4e
5 files changed
+85 -47

No files matched your search

@@ -70,6 +70,10 @@ export class PreferenceField<
set(value: Fields[Key]) {
return this.#preferences.writeRaw(this.#fieldKey, value);
}
get key(): Key {
return this.#fieldKey;
}
}
/**