/// export = fetch; /** * @callback FetchCallback * @param {Error | null} err * @param {Object | null} [json] * @param {IncomingMessage} [res] */ /** * @param {RequestOptions & JsonRequestOptions} options * @param {null | string | JsonObject | Readable | FetchCallback} data * @param {FetchCallback} [callback] * @returns {ClientRequest} */ declare function fetch(options: RequestOptions & JsonRequestOptions, data: null | string | JsonObject | Readable | FetchCallback, callback?: FetchCallback | undefined): ClientRequest; declare namespace fetch { export { FetchCallback, RequestOptions, ClientRequest, IncomingMessage, Readable, Failure, Logger, JsonRequestOptions, JsonValue, JsonArray, JsonObject }; } type RequestOptions = import('http').RequestOptions; type JsonRequestOptions = { timeout?: number | undefined; expect?: number | number[] | undefined; stream?: boolean | undefined; log?: logger.Logger | undefined; }; type JsonObject = { [k: string]: JsonValue; }; type Readable = import('stream').Readable; type FetchCallback = (err: Error | null, json?: any | null, res?: http.IncomingMessage | undefined) => any; type ClientRequest = import('http').ClientRequest; type IncomingMessage = import('http').IncomingMessage; type Failure = import('@studio/fail').Failure; type Logger = import('@studio/log').Logger; type JsonValue = undefined | null | boolean | number | string | JsonValue[] | JsonObject; type JsonArray = JsonValue[]; import logger = require("@studio/log"); import http = require("http");