Documentation / zerotal / index / NextFn
Type Alias: NextFn
NextFn = () =>
Promise<Response|void>
Defined in: packages/core/src/pipeline/types.ts:16
Passes control to the rest of the pipeline and resolves with the Response
produced downstream (or undefined when nothing deeper has set one yet —
the controller may not have run, or a deeper pipe short-circuited with void).
Always guard the result before touching it:
const res = await next(); if (res) res.headers.get('…'); // res is Response | undefined
Returns
Promise<Response | void>