Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.

Commit 7d3a59f

Browse files
committed
add typescript types (#28)
1 parent bfe9ec5 commit 7d3a59f

File tree

3 files changed

+862
-0
lines changed

3 files changed

+862
-0
lines changed

index.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Agent, AgentOptions } from 'agent-base';
2+
3+
declare module ProxyAgent {
4+
// instance-side interface type
5+
interface ProxyAgent extends Agent {
6+
}
7+
}
8+
9+
// value declaration for constructor
10+
declare const proxy: ProxyAgentConstructor;
11+
12+
interface ProxyAgentConstructor {
13+
(options: string | Url): ProxyAgent.ProxyAgent;
14+
new (options: string | Url): ProxyAgent.ProxyAgent;
15+
}
16+
17+
export = proxy;

0 commit comments

Comments
 (0)