function calculateBackoffDelayMs(attemptNumber, options = {}) {
  const baseDelayMs = options.baseDelayMs ?? 1e3;
  const maxJitterMs = options.maxJitterMs ?? 1e3;
  const factor = options.factor ?? 2;
  const jitterMs = maxJitterMs > 0 ? Math.floor(Math.random() * maxJitterMs) : 0;
  return baseDelayMs * Math.pow(factor, Math.max(attemptNumber - 1, 0)) + jitterMs;
}
export {
  calculateBackoffDelayMs
};
//# sourceMappingURL=retry.js.map
