Skip to content

CloseOptions

CloseOptions = { drain?: false; timeoutMs?: number; } | { drain: true; timeoutMs: number; }

Defined in: src/core/types.ts:479

Options for HttpClient.close().

Modelled as a union so the type mirrors the runtime contract: timeoutMs is required only when draining. A single { drain?: boolean; timeoutMs: number } shape made close({ drain: false }) a type error even though it is the documented, working way to close without draining.