fix(lint): resolve no-unused-vars errors flagged by CI
- bounded-retry.ts:103 — drop unused generic parameter <T> from
BoundedRetryOptions interface (and its single use at line 220).
The generic served no purpose: the caller's return type is inferred
from the operation function, not from the options.
- retry-utils.test.ts:5 — remove `beforeEach` from imports. It was
only used by the RetryManager describe block, removed in commit
0f2402da58.
Build clean, 58 tests pass (12 bounded-retry + 46 retry-utils).
This commit is contained in:
@@ -100,7 +100,7 @@ export const DEFAULT_TTL_MS = 10 * 60 * 1000
|
||||
*/
|
||||
export const DEFAULT_PER_ATTEMPT_TIMEOUT_MS = 30000
|
||||
|
||||
export interface BoundedRetryOptions<T> {
|
||||
export interface BoundedRetryOptions {
|
||||
/** Operation name for logging/metrics */
|
||||
name?: string
|
||||
/** Sequence of delays (ms). Last value is used as cap. */
|
||||
@@ -217,7 +217,7 @@ function sleep(ms: number, signal?: AbortSignal): Promise<void> {
|
||||
*/
|
||||
export async function withBoundedRetry<T>(
|
||||
operation: () => Promise<T>,
|
||||
options: BoundedRetryOptions<T> = {}
|
||||
options: BoundedRetryOptions = {}
|
||||
): Promise<T> {
|
||||
const name = options.name ?? 'bounded-retry'
|
||||
const delays = options.delays ?? WHATSAPP_BACKOFF_DELAYS
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Testes unitários para retry-utils.ts
|
||||
*/
|
||||
|
||||
import { beforeEach, describe, expect, it, jest } from '@jest/globals'
|
||||
import { describe, expect, it, jest } from '@jest/globals'
|
||||
import {
|
||||
calculateDelay,
|
||||
createRetrier,
|
||||
|
||||
Reference in New Issue
Block a user