[Backport 7.x] The agent function should take the Connection contructor options as argument (#1334)

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2020-10-12 11:13:34 +02:00
committed by GitHub
parent 34dedb8119
commit dd8ee9056b
5 changed files with 43 additions and 23 deletions

4
lib/Connection.d.ts vendored
View File

@ -28,9 +28,9 @@ import * as https from 'https'
import * as hpagent from 'hpagent'
import { ConnectionOptions as TlsConnectionOptions } from 'tls'
export declare type agentFn = () => any;
export declare type agentFn = (opts: ConnectionOptions) => any;
interface ConnectionOptions {
export interface ConnectionOptions {
url: URL;
ssl?: TlsConnectionOptions;
id?: string;