import type { OutgoingHttpHeaders } from 'http'; import { Duplex } from 'stream'; import type { NodeIncomingMessage } from '../interfaces/node-incoming-message.interface.js'; import type { NodeOutgoingMessage } from '../interfaces/node-outgoing-message.interface.js'; export declare const kOutHeaders: unique symbol; export declare const kOutTrailers: unique symbol; declare global { interface Headers { keys(): IterableIterator; entries(): IterableIterator<[string, any]>; } } /** * * @class NodeOutgoingMessageHost */ export declare class NodeOutgoingMessageHost extends Duplex implements NodeOutgoingMessage { protected [kOutHeaders]?: Record; protected [kOutTrailers]?: Record; protected _headersSent: boolean; protected _httpVersionMajor?: number; protected _httpVersionMinor?: number; finished: boolean; req: NodeIncomingMessage; statusCode: number; statusMessage: string; chunkedEncoding: boolean; sendDate: boolean; strictContentLength: boolean; body?: any; constructor(init?: NodeOutgoingMessage.Initiator); get httpVersionMajor(): number | undefined; get httpVersionMinor(): number | undefined; get headersSent(): boolean; appendHeader(name: string, value: number | string | readonly string[]): this; addTrailers(headers: OutgoingHttpHeaders | [string, string][] | readonly [string, string][]): void; flushHeaders(): void; setHeader(name: string, value: number | string | readonly string[]): this; setHeaders(headers: Headers | Map | Record): this; getHeader(name: string): any; getHeaderNames(): string[]; getRawHeaderNames(): string[]; getHeaders(): OutgoingHttpHeaders; hasHeader(name: string): boolean; removeHeader(name: string): void; end(cb?: () => void): this; end(chunk: any, cb?: () => void): this; end(chunk: any, encoding: BufferEncoding, cb?: () => void): this; }