Fields to provide now. All are optional; missing fields keep the closure open.
tracer — a valid TracerModule objectcode — source code / input string to traceconfig — { meta?, options? } config object. Pass {} for defaults.
undefined = "not yet provided" (returns closure); {} = "use defaults" (proceeds).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: {} });
Safe tracing with partial application. Result pattern — never throws.
tracer,code,config) → returnsPromise<TracifyResult>TracifyClosurefor further partial application