@study-lenses/tracing
    Preparing search index...

    Function tracify

    • Safe tracing with partial application. Result pattern — never throws.

      • All 3 fields present (tracer, code, config) → returns Promise<TracifyResult>
      • Any field missing → returns TracifyClosure for further partial application

      Parameters

      • input: TracifyInput = {}

        Fields to provide now. All are optional; missing fields keep the closure open.

        • tracer — a valid TracerModule object
        • code — source code / input string to trace
        • config{ meta?, options? } config object. Pass {} for defaults. undefined = "not yet provided" (returns closure); {} = "use defaults" (proceeds).

      Returns Promise<TracifyResult> | TracifyClosure

      Promise<TracifyResult> when all 3 fields are set; TracifyClosure otherwise

      Never throws. All errors — including TracerInvalidError — are caught and returned as { ok: false, error }. Safe to use in production without try-catch.

      // All at once
      const result = await tracify({ tracer: myTracer, code: 'hello', config: {} });
      if (result.ok) console.log(result.steps);

      // Partial application — build up state across call sites
      const withTracer = tracify({ tracer: myTracer });
      const result = await withTracer({ code: 'hello', config: {} });