import type { ServerResponse } from "node:http"; import type { VextRequest } from "../../types/request.js"; import type { VextResponse } from "../../types/response.js"; type RequestIdSource = Pick | (() => string); /** * 创建 VextResponse 实例(工厂函数 — 保持与其他 Adapter 的调用接口一致) * * F5 优化:内部使用 NativeVextResponse class 实例化, * 方法通过原型链共享,避免闭包工厂模式下每请求创建 N 个函数对象。 * * @param serverResponse Node.js ServerResponse 原始响应对象 * @param requestIdSource 延迟获取 requestId 的来源;优先传入 VextRequest 对象以减少闭包分配 * @returns VextResponse 实例(含内部方法 _enableWrap) */ export declare function createVextResponse(serverResponse: ServerResponse, requestIdSource: RequestIdSource): VextResponse; export {};