• Version 4.2.5
  • Published
  • 4.64 kB
  • 1 dependency
  • MIT license


npm i @types/agent-base
yarn add @types/agent-base
pnpm add @types/agent-base


TypeScript definitions for agent-base



function Agent

Agent: {
(opts?: Agent.AgentOptions): Agent.Agent;
(callback: Agent.AgentCallback, opts?: Agent.AgentOptions): Agent.Agent;
  • Base http.Agent implementation. No pooling/keep-alive is implemented by default.


interface Agent

interface Agent extends EventEmitter {}

    property addRequest

    addRequest: (req?: any, opts?: any) => void;

      property callback

      callback: AgentCallback;

        property freeSocket

        freeSocket: (socket: any, opts: any) => void;

          property options

          options?: AgentOptions | undefined;

            property timeout

            timeout: number | null;

              interface AgentOptions

              interface AgentOptions {}

                property host

                host?: string | undefined;

                  property port

                  port?: number | undefined;

                    property timeout

                    timeout?: number | undefined;

                      index signature

                      [key: string]: any;

                        Type Aliases

                        type AgentCallback

                        type AgentCallback = (
                        req?: any,
                        opts?: {
                        secureEndpoint: boolean;
                        ) => void;

                          Package Files (1)

                          Dependencies (1)

                          Dev Dependencies (0)

                          No dev dependencies.

                          Peer Dependencies (0)

                          No peer dependencies.


                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/agent-base.

                          • Markdown
                          • HTML
                            <a href="https://www.jsdocs.io/package/@types/agent-base"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>