index.d.ts 970 B

1234567891011121314151617181920212223
  1. /// <reference types="node" />
  2. import net from 'net';
  3. import tls from 'tls';
  4. import { Url } from 'url';
  5. import { AgentOptions } from 'agent-base';
  6. import { OutgoingHttpHeaders } from 'http';
  7. import _HttpsProxyAgent from './agent';
  8. declare function createHttpsProxyAgent(opts: string | createHttpsProxyAgent.HttpsProxyAgentOptions): _HttpsProxyAgent;
  9. declare namespace createHttpsProxyAgent {
  10. interface BaseHttpsProxyAgentOptions {
  11. headers?: OutgoingHttpHeaders;
  12. secureProxy?: boolean;
  13. host?: string | null;
  14. path?: string | null;
  15. port?: string | number | null;
  16. }
  17. export interface HttpsProxyAgentOptions extends AgentOptions, BaseHttpsProxyAgentOptions, Partial<Omit<Url & net.NetConnectOpts & tls.ConnectionOptions, keyof BaseHttpsProxyAgentOptions>> {
  18. }
  19. export type HttpsProxyAgent = _HttpsProxyAgent;
  20. export const HttpsProxyAgent: typeof _HttpsProxyAgent;
  21. export {};
  22. }
  23. export = createHttpsProxyAgent;