finki-main
main
|
Last change
on this file since 81bc7da was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
599 bytes
|
| Line | |
|---|
| 1 | import {IncomingMessage} from 'http';
|
|---|
| 2 |
|
|---|
| 3 | /**
|
|---|
| 4 | Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
|
|---|
| 5 |
|
|---|
| 6 | Makes `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 | */
|
|---|
| 12 | declare function mimicResponse<T extends NodeJS.ReadableStream>(
|
|---|
| 13 | fromStream: IncomingMessage, // eslint-disable-line @typescript-eslint/prefer-readonly-parameter-types
|
|---|
| 14 | toStream: T,
|
|---|
| 15 | ): T & IncomingMessage;
|
|---|
| 16 |
|
|---|
| 17 | export = mimicResponse;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.