UNPKG

@microsoft/teams.apps

Version:

<p> <a href="https://www.npmjs.com/package/@microsoft/teams.apps" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.apps/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.apps?activeTab=code

23 lines (22 loc) • 584 B
import { ILogger } from '@microsoft/teams.common'; export type RetryOptions = { /** * the max number of attempts * @default 5 */ readonly max?: number; /** * the delay in ms per retry * @default 500ms */ readonly delay?: number; /** * the logger to use */ readonly logger?: ILogger; /** * errors that should not be retried */ readonly nonRetryable?: ReadonlyArray<new (...args: any[]) => Error>; }; export declare function retry<T = any>(factory: () => Promise<T>, options?: RetryOptions): Promise<T>;