Prelude API
    Preparing search index...

    Function shrink

    • Shrinks a failing trace to a locally minimal one: repeatedly removes chunks of operations (halving the chunk size down to one), then tries the simplify candidates for each remaining operation, as long as run still throws. Returns the minimal trace and the error it produces.

      Type Parameters

      • Op

      Parameters

      • run: (ops: readonly Op[]) => void | Promise<void>
      • ops: readonly Op[]
      • error: unknown
      • Optionalsimplify: (op: Op) => Op[]

      Returns Promise<{ error: unknown; ops: readonly Op[] }>