Type Alias: EngineSelectionMiddlewareFn
ts
type EngineSelectionMiddlewareFn = (
ctx: EngineSelectionContext,
next: NextFn,
) => void | Promise<void>;Defined in: src/batteries/media/registry.ts:111
A selection-middleware stage — the seam for quality heuristics and implementor overrides when several engines can perform the same transform (e.g. route complex workbooks past a pure-JS converter to LibreOffice). Same onion shape as the battery's use interceptors; a fresh runner is minted per dispatch. Keep stages cheap or memoized: they run with bytes in hand on every dispatch.
Parameters
| Parameter | Type |
|---|---|
ctx | EngineSelectionContext |
next | NextFn |
Returns
void | Promise<void>