From 44981839f8532b8a6167708f9a692808974b9bd8 Mon Sep 17 00:00:00 2001 From: Harvmaster Date: Thu, 6 Aug 2026 10:08:13 +0000 Subject: [PATCH] Add TS Docs throws to constructor --- source/exponential-backoff.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/exponential-backoff.ts b/source/exponential-backoff.ts index 89c3056..580b50f 100644 --- a/source/exponential-backoff.ts +++ b/source/exponential-backoff.ts @@ -76,6 +76,11 @@ export class ExponentialBackoff { * @param options.baseDelay - Delay used as the basis for the first retry. Default: `1_000` ms. * @param options.growthRate - Multiplier applied to the delay after each attempt. Default: `2`. * @param options.jitter - Maximum proportional reduction subtracted from each delay (0–1). Default: `0.1`. + * + * @throws An {@link ExponentialBackoffNumberNotFiniteError} if a provided option is not a finite number + * @throws An {@link ExponentialBackoffNumberOutOfBoundsError} if a provided option is out of bounds + * @throws An {@link ExponentialBackoffNumberTooSmallError} if a provided option is too small + * @throws An {@link ExponentialBackoffNonIntegerError} if a provided option is not an integer */ constructor(options: Partial = {}) { this.#options = {