From f832afa99e34fcb73b580179ee4e785ee490c1ea Mon Sep 17 00:00:00 2001 From: OOP Date: Wed, 24 Oct 2018 00:59:09 +0700 Subject: [PATCH 1/2] Add definition file for Agent.js --- lib/Agent.d.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/Agent.d.ts diff --git a/lib/Agent.d.ts b/lib/Agent.d.ts new file mode 100644 index 0000000..e688d44 --- /dev/null +++ b/lib/Agent.d.ts @@ -0,0 +1,13 @@ +import * as https from 'https' +declare interface AgentOptions extends https.AgentOptions{ + socksHost?: string; + socksPort?: number; + +} +declare class Agent extends https.Agent{ + constructor(options?: AgentOptions); + options: AgentOptions; + socksHost?: string; + socksPort?: number; +} +export = Agent From c469eb4491f5a36b0c2e65639bc21a5777432ce8 Mon Sep 17 00:00:00 2001 From: OOP Date: Wed, 24 Oct 2018 01:03:02 +0700 Subject: [PATCH 2/2] update --- lib/Agent.d.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Agent.d.ts b/lib/Agent.d.ts index e688d44..84e280a 100644 --- a/lib/Agent.d.ts +++ b/lib/Agent.d.ts @@ -2,12 +2,11 @@ import * as https from 'https' declare interface AgentOptions extends https.AgentOptions{ socksHost?: string; socksPort?: number; - } declare class Agent extends https.Agent{ constructor(options?: AgentOptions); options: AgentOptions; - socksHost?: string; - socksPort?: number; + socksHost: string; + socksPort: number; } export = Agent