From 949e64c7b526c9c5a81fbbf2a1ba990a92981949 Mon Sep 17 00:00:00 2001 From: R Midhun Suresh Date: Thu, 23 Oct 2025 12:19:22 +0530 Subject: [PATCH] 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. --- packages/element-web-module-api/src/api/watchable.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/element-web-module-api/src/api/watchable.ts b/packages/element-web-module-api/src/api/watchable.ts index 2f82a9b732..3fda595d2c 100644 --- a/packages/element-web-module-api/src/api/watchable.ts +++ b/packages/element-web-module-api/src/api/watchable.ts @@ -26,7 +26,7 @@ function isObject(value: unknown): value is object { * @public */ export class Watchable { - private readonly listeners = new Set>(); + protected readonly listeners = new Set>(); public constructor(private currentValue: T) {}