Home / Function/ retryAssertion() — tailwindcss Function Reference

retryAssertion() — tailwindcss Function Reference

Architecture documentation for the retryAssertion() function in utils.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  dc20bda5_e334_9ff7_d816_63cc049e6e0b["retryAssertion()"]
  323920ab_ae9d_fcbf_30d4_edccd93f84b9["test()"]
  323920ab_ae9d_fcbf_30d4_edccd93f84b9 -->|calls| dc20bda5_e334_9ff7_d816_63cc049e6e0b
  style dc20bda5_e334_9ff7_d816_63cc049e6e0b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

integrations/utils.ts lines 547–562

export async function retryAssertion<T>(
  fn: () => Promise<T>,
  { timeout = ASSERTION_TIMEOUT, delay = 5 }: { timeout?: number; delay?: number } = {},
) {
  let end = Date.now() + timeout
  let error: any
  while (Date.now() < end) {
    try {
      return await fn()
    } catch (err) {
      error = err
      await new Promise((resolve) => setTimeout(resolve, delay))
    }
  }
  throw error
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does retryAssertion() do?
retryAssertion() is a function in the tailwindcss codebase.
What calls retryAssertion()?
retryAssertion() is called by 1 function(s): test.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free