UNPKG

624 BTypeScriptView Raw
1/// <reference types="node" />
2/// <reference types="node" />
3/// <reference types="node" />
4/// <reference types="node" />
5/// <reference types="node" />
6import * as http from 'http';
7import * as https from 'https';
8import type { Readable } from 'stream';
9export type ThenableRequest = http.ClientRequest & {
10 then: Promise<http.IncomingMessage>['then'];
11};
12export declare function toBuffer(stream: Readable): Promise<Buffer>;
13export declare function json(stream: Readable): Promise<any>;
14export declare function req(url: string | URL, opts?: https.RequestOptions): ThenableRequest;
15//# sourceMappingURL=helpers.d.ts.map
\No newline at end of file