Skip to content
English

ThrottleOptionsValidator

Defined in: src/ThrottleOptions.ts:98

Validates resolved ThrottleOptionsType settings.

qps legitimately admits Infinity — the documented “remove the throttle” sentinel — which the generic positiveNumber helper rejects (it requires Number.isFinite), so its rule is bespoke, the same shape ConsumerControllerOptionsValidator uses for its unbounded-map opt-out. burst is a real capacity (finite > 0); onExcess one of the two known modes. clock is an object and is not validated.

new ThrottleOptionsValidator(): ThrottleOptionsValidator

Defined in: src/ThrottleOptions.ts:99

ThrottleOptionsValidator

OptionsValidator<ThrottleOptionsType>.constructor

validate(settings): void

Defined in: src/util/OptionsValidator.ts:109

Check the (merged) settings; throws OptionsError on the first violation. Unset (undefined) fields always pass.

Partial<T>

void

OptionsValidator.validate