Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/somefn/js/err.ts>autoRetry

some functions for deno
Go to Latest
function autoRetry
import { autoRetry } from "https://deno.land/x/somefn@v0.27.0/js/err.ts";

[高阶函数] 网络错误时自动重试

Type Parameters

T extends Array<any>
R

Parameters

fn: (...rest: T) => Promise<R>

函数本身, 需要为异步

optional
unnamed 1: { retry?: number; isRetryable?: (err: Error) => boolean; delayms?: number; timeout?: number; } = [UNSUPPORTED]

参数

Returns

(...rest: T) => Promise<R>