intermediate
Challenge: a retry that backs off
Implement this from the stub. Hidden tests grade the behaviour you write, not the comments you leave.
Challenge: A Retry That Backs Off
export interface RetryOptions {
retries: number
baseDelayMs: number
}
export async function fetchWithRetry<T>(
load: () => Promise<T>,
options: RetryOptions,
sleep: (ms: number) => Promise<void>
): Promise<T> {
// Your implementation here
}challenge — implement from scratchCtrl+↵ submits · Ctrl+Shift+↵ runsstarter code