From 59a0e8be88a2c520d37437d4d80ea2b6707df558 Mon Sep 17 00:00:00 2001 From: Mike Presman Date: Wed, 10 Jan 2024 16:17:39 -0500 Subject: [PATCH] add retriesCount type definition (#345) --- types/index.d.ts | 1 + types/index.test-d.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 2effadaf..61035b76 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -47,6 +47,7 @@ declare namespace fastifyReplyFrom { req: FastifyRequest; res: FastifyReply; attempt: number; + retriesCount: number; getDefaultDelay: () => number | null; } export interface FastifyReplyFromHooks { diff --git a/types/index.test-d.ts b/types/index.test-d.ts index edd96696..0185b5a0 100644 --- a/types/index.test-d.ts +++ b/types/index.test-d.ts @@ -91,7 +91,7 @@ async function main() { instance.get("/http2", (request, reply) => { reply.from("/", { method: "POST", - retryDelay: ({err, req, res, attempt, getDefaultDelay}) => { + retryDelay: ({err, req, res, attempt, retriesCount, getDefaultDelay }) => { const defaultDelay = getDefaultDelay(); if (defaultDelay) return defaultDelay;