Skip to content

Commit bd5250d

Browse files
committed
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.
1 parent f79149f commit bd5250d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/element-web-module-api/src/api/watchable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function isObject(value: unknown): value is object {
2626
* @public
2727
*/
2828
export class Watchable<T> {
29-
private readonly listeners = new Set<WatchFn<T>>();
29+
protected readonly listeners = new Set<WatchFn<T>>();
3030

3131
public constructor(private currentValue: T) {}
3232

0 commit comments

Comments
 (0)