"Fossies" - the Fresh Open Source Software Archive

Member "node-v12.18.4-win-x64/node_modules/npm/node_modules/agentkeepalive/index.d.ts" (14 Feb 2020, 1123 Bytes) of package /windows/www/node-v12.18.4-win-x64.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 declare module "agentkeepalive" {
    2   import * as http from 'http';
    3   import * as https from 'https';
    4 
    5   interface AgentStatus {
    6     createSocketCount: number,
    7     createSocketErrorCount: number,
    8     closeSocketCount: number,
    9     errorSocketCount: number,
   10     timeoutSocketCount: number,
   11     requestCount: number,
   12     freeSockets: object,
   13     sockets: object,
   14     requests: object,
   15   }
   16 
   17   interface HttpOptions extends http.AgentOptions {
   18     freeSocketKeepAliveTimeout?: number;
   19     timeout?: number;
   20     socketActiveTTL?: number;
   21   }
   22 
   23   interface HttpsOptions extends https.AgentOptions {
   24     freeSocketKeepAliveTimeout?: number;
   25     timeout?: number;
   26     socketActiveTTL?: number;
   27   }
   28 
   29   class internal extends http.Agent {
   30     constructor(opts?: HttpOptions);
   31     readonly statusChanged: boolean;
   32     createSocket(req: http.IncomingMessage, options: http.RequestOptions, cb: Function): void;
   33     getCurrentStatus(): AgentStatus;
   34   }
   35 
   36   namespace internal {
   37     export class HttpsAgent extends internal {
   38       constructor(opts?: HttpsOptions);
   39     }
   40   }
   41 
   42   export = internal;
   43 }