@types/agent-base
TypeScript definitions for agent-base
Last updated 8 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/agent-base 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/agent-base

Summary

This package contains type definitions for agent-base (https://github.com/TooTallNate/node-agent-base#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/agent-base.

index.d.ts

// Type definitions for agent-base 4.2
// Project: https://github.com/TooTallNate/node-agent-base#readme
// Definitions by: Christopher Quadflieg <https://github.com/Shinigami92>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />
import { EventEmitter } from 'events';

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

    interface AgentOptions {
        timeout?: number | undefined;
        host?: string | undefined;
        port?: number | undefined;
        [key: string]: any;
    }

    interface Agent extends EventEmitter {
        _promisifiedCallback: boolean;
        timeout: number | null;
        options?: AgentOptions | undefined;
        callback: AgentCallback;
        addRequest: (req?: any, opts?: any) => void;
        freeSocket: (socket: any, opts: any) => void;
    }
}

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

export = Agent;

Additional Details

  • Last updated: Tue, 06 Jul 2021 18:05:31 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Christopher Quadflieg.

Current Tags

  • 4.2.2                                ...           latest (5 years ago)
  • 4.2.0                                ...           ts2.0 (8 years ago)
  • 4.2.0                                ...           ts2.1 (8 years ago)
  • 4.2.0                                ...           ts2.2 (8 years ago)
  • 4.2.0                                ...           ts2.3 (8 years ago)
  • 4.2.0                                ...           ts2.4 (8 years ago)
  • 4.2.0                                ...           ts2.5 (8 years ago)
  • 4.2.0                                ...           ts2.6 (8 years ago)
  • 4.2.0                                ...           ts2.7 (8 years ago)
  • 4.2.0                                ...           ts2.8 (8 years ago)
  • 4.2.0                                ...           ts2.9 (8 years ago)
  • 4.2.1                                ...           ts3.0 (6 years ago)
  • 4.2.1                                ...           ts3.1 (6 years ago)
  • 4.2.1                                ...           ts3.2 (6 years ago)
  • 4.2.1                                ...           ts3.3 (6 years ago)
  • 4.2.1                                ...           ts3.4 (6 years ago)
  • 4.2.1                                ...           ts3.5 (6 years ago)
  • 4.2.2                                ...           ts3.6 (5 years ago)
  • 4.2.2                                ...           ts3.7 (5 years ago)
  • 4.2.2                                ...           ts3.8 (5 years ago)
  • 4.2.2                                ...           ts3.9 (5 years ago)
  • 4.2.2                                ...           ts4.0 (5 years ago)
  • 4.2.2                                ...           ts4.1 (5 years ago)
  • 4.2.2                                ...           ts4.2 (5 years ago)
  • 4.2.2                                ...           ts4.3 (5 years ago)
  • 4.2.2                                ...           ts4.4 (5 years ago)
  • 4.2.2                                ...           ts4.5 (5 years ago)
  • 4.2.2                                ...           ts4.6 (5 years ago)

3 Versions

  • 4.2.2                                ...           5 years ago
  • 4.2.1                                ...           6 years ago
  • 4.2.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |