Skip to content

Commit 2cecf23

Browse files
committed
✨ Add forceUpdate function to Valuable class
1 parent bf1fb60 commit 2cecf23

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/util/stores.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export class Valuable<T> implements Writable<T> {
2121
return this.store.set(this.valueValidator(value))
2222
}
2323

24+
forceUpdate() {
25+
return this.store.set(this.get())
26+
}
27+
2428
update(fn: (value: T) => T) {
2529
return this.store.update((value: T) => this.valueValidator(fn(value)))
2630
}

0 commit comments

Comments
 (0)