From 8fffbb878d60d3e7a075e2be030573ac5f8e774c Mon Sep 17 00:00:00 2001 From: Jeremy Bornstein Date: Tue, 13 Jan 2026 08:12:53 +1100 Subject: [PATCH] Add interface type-checking for timeSource config in RequestDelay. Use MustBe.instanceOf() to validate that non-null timeSource values implement IntfTimeSource, matching the pattern used in TokenBucket. --- src/webapp-builtins/export/RequestDelay.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/webapp-builtins/export/RequestDelay.js b/src/webapp-builtins/export/RequestDelay.js index f12720134..09a14cca9 100644 --- a/src/webapp-builtins/export/RequestDelay.js +++ b/src/webapp-builtins/export/RequestDelay.js @@ -101,12 +101,9 @@ export class RequestDelay extends BaseApplication { * @returns {IntfTimeSource} Accepted configuration value. */ _config_timeSource(value = null) { - // TODO: Check that a non-`null` `value` actually implements - // `IntfTimeSource`. - return (value === null) ? StdTimeSource.INSTANCE - : MustBe.object(value); + : MustBe.instanceOf(value, IntfTimeSource); } /** @override */