export interface Todo {
id: string;
title: string;
completed: boolean;
}
const RETRYABLE_STATUS = new Set([408, 429, 500, 502, 503, 504]);
export function fullJitter(attempt, baseDelay = 300, maxDelay = 10_000) {
const ceiling = Math.min(maxDelay, baseDelay * 2 ** attempt);
return Math.random() * ceiling;
}