Browse documentation

OfflineQueueOptions

Type. OfflineQueue delivery and retry configuration.

Table of contents

Category

Type

Type import

ts
import type { OfflineQueueOptions } from "valyrian.js/offline";

Public signature

ts
type OfflineQueueOptions = { id: string; network: NetworkManager; storage?: "local" | "session"; handler: (operation: OfflineOperation) => Promise<unknown>; isRetryable?: (error: unknown) => boolean; backoff?: BackoffConfig; maxRetries?: number; };

Type usage

OfflineQueueOptions defines storage, delivery, retry classification and backoff.

Defaults

storage defaults to local, isRetryable accepts every error, backoff uses its own defaults and maxRetries defaults to 5.