Pular para o conteúdo
Português (BR)

RateLimitOptionsValidator

Este conteúdo não está disponível em sua língua ainda.

Defined in: src/http/cache/RateLimitOptions.ts:92

Validates resolved RateLimitOptionsType settings: the rolling window (windowMs) must be a positive finite number of milliseconds and the per-window cap (max) a positive integer. (Presence of cache / key is a required-field concern, not a domain-validity one.)

new RateLimitOptionsValidator(): RateLimitOptionsValidator

Defined in: src/http/cache/RateLimitOptions.ts:93

RateLimitOptionsValidator

OptionsValidator<RateLimitOptionsType>.constructor

validate(settings): void

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

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

Partial<T>

void

OptionsValidator.validate