> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# RetryBackoff

> Type alias exported by @botmesh/core.

```ts theme={null}
type RetryBackoff = 
  | ((attempt) => number)
  | {
  baseMs?: number | string;
  capMs?: number | string;
  jitter?: number;
};
```

Defined in: [durability/types.ts:348](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/types.ts#L348)

Retry delay policy: a function of the 1-based attempt that just failed, or the
parameters of capped exponential backoff with jitter
(`min(capMs, baseMs * 2^(attempt-1))`, then ± `jitter` fraction).

## Union Members

### Function

```ts theme={null}
(attempt) => number
```

***

### Type Literal

```ts theme={null}
{
  baseMs?: number | string;
  capMs?: number | string;
  jitter?: number;
}
```

| Name | Type | Description | Defined in |
| - | - | - | - |
| `baseMs?` | `number` \| `string` | First delay: a duration (`'1s'`) or ms. | [durability/types.ts:352](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/types.ts#L352) |
| `capMs?` | `number` \| `string` | Longest delay: a duration (`'1m'`) or ms. | [durability/types.ts:354](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/types.ts#L354) |
| `jitter?` | `number` | Symmetric jitter fraction, `0`–`1`. | [durability/types.ts:356](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/types.ts#L356) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.