From 83b0f8edf05f6fd251dd0b307cd638811b735efe Mon Sep 17 00:00:00 2001 From: Ste Prescott Date: Wed, 17 Oct 2018 16:53:06 +0100 Subject: [PATCH] Expose properties of HttpProxyAgent (#29745) * Expose properties of HttpProxyAgent * Use 4 spaces over tabs * Remove options & timeout properties --- types/http-proxy-agent/http-proxy-agent-tests.ts | 3 +++ types/http-proxy-agent/index.d.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/types/http-proxy-agent/http-proxy-agent-tests.ts b/types/http-proxy-agent/http-proxy-agent-tests.ts index f730cd1bde..2158a9129f 100644 --- a/types/http-proxy-agent/http-proxy-agent-tests.ts +++ b/types/http-proxy-agent/http-proxy-agent-tests.ts @@ -5,6 +5,9 @@ new Agent('url'); new Agent({}); new Agent({ host: 'url' }); +new Agent({}).proxy; +new Agent({}).secureProxy; + // $ExpectError new Agent(); diff --git a/types/http-proxy-agent/index.d.ts b/types/http-proxy-agent/index.d.ts index 015508b5d1..b518fddf0c 100644 --- a/types/http-proxy-agent/index.d.ts +++ b/types/http-proxy-agent/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for http-proxy-agent 2.0 // Project: https://github.com/TooTallNate/node-http-proxy-agent // Definitions by: mrmlnc +// steprescott // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -10,6 +11,9 @@ import { Url } from 'url'; declare class HttpProxyAgent extends Agent { constructor(options: string | Url); + + proxy: Url; + secureProxy: boolean; } export = HttpProxyAgent;