CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
index.d.ts18 linesDownload Raw Back to mimic-response
1import {IncomingMessage} from 'http';2 3/**4Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)5 6Makes `toStream` include the properties from `fromStream`.7 8@param fromStream - The stream to copy the properties from.9@param toStream - The stream to copy the properties to.10@return The same object as `toStream`.11*/12declare function mimicResponse<T extends NodeJS.ReadableStream>(13	fromStream: IncomingMessage, // eslint-disable-line @typescript-eslint/prefer-readonly-parameter-types14	toStream: T,15): T & IncomingMessage;16 17export = mimicResponse;18