UNPKG

@worker-tools/middleware

Version:

A suite of standalone HTTP server middlewares for Worker Runtimes.

13 lines (12 loc) 564 B
export { pipe as combine } from 'ts-functional-pipe'; import type { Awaitable } from "./utils/common-types.js"; import type { Context } from "./index.js"; export interface FlushedContext { /** * A promise that resolves when the entire response body has been written to the wire, * or if the stream has been closed for any other reason. * Most likely useful when combined with streaming responses. */ flushed: Promise<Response>; } export declare const flushed: () => <X extends Context>(ax: Awaitable<X>) => Promise<X & FlushedContext>;