Skip to content

Commit

Permalink
add retriesCount type definition (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePresman committed Jan 10, 2024
1 parent 8acd837 commit 59a0e8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ declare namespace fastifyReplyFrom {
req: FastifyRequest<RequestGenericInterface, RawServerBase>;
res: FastifyReply<RawServerBase>;
attempt: number;
retriesCount: number;
getDefaultDelay: () => number | null;
}
export interface FastifyReplyFromHooks {
Expand Down
2 changes: 1 addition & 1 deletion types/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 59a0e8b

Please sign in to comment.