mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 06:58:25 +00:00
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:
@@ -26,7 +26,7 @@ function isObject(value: unknown): value is object {
|
|||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export class Watchable<T> {
|
export class Watchable<T> {
|
||||||
private readonly listeners = new Set<WatchFn<T>>();
|
protected readonly listeners = new Set<WatchFn<T>>();
|
||||||
|
|
||||||
public constructor(private currentValue: T) {}
|
public constructor(private currentValue: T) {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user