import type { NextFn } from '@nhtio/middleware'; /** * Execute an asynchronous middleware onion around a terminal operation. * * A fresh runner is deliberately created for each invocation: middleware runners are single-use. * Errors are captured and re-thrown unchanged — including a thrown `undefined`, which a * value-based sentinel would silently swallow — while a chain that stops without invoking its * terminal operation is reported through `onNoNext`. */ export declare const runOnion: (ctx: Ctx, use: readonly ((ctx: Ctx, next: NextFn) => void | Promise)[], core: () => Promise, onNoNext: () => never) => Promise;