Make field protected so that Watchable can be extended

So that you can have custom watchables that have very specific
behaviour, think `class NameWatchable extends Watchable`. Useful to have
access to `listeners` when you do this.
This commit is contained in:
R Midhun Suresh
2025-10-23 12:19:22 +05:30
parent c24cfb6311
commit 949e64c7b5
@@ -26,7 +26,7 @@ function isObject(value: unknown): value is object {
* @public
*/
export class Watchable<T> {
private readonly listeners = new Set<WatchFn<T>>();
protected readonly listeners = new Set<WatchFn<T>>();
public constructor(private currentValue: T) {}