source: imaps-frontend/node_modules/undici-types/agent.d.ts

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.0 KB
Line 
1import { URL } from 'url'
2import Pool from './pool'
3import Dispatcher from "./dispatcher";
4
5export default Agent
6
7declare class Agent extends Dispatcher{
8 constructor(opts?: Agent.Options)
9 /** `true` after `dispatcher.close()` has been called. */
10 closed: boolean;
11 /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
12 destroyed: boolean;
13 /** Dispatches a request. */
14 dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
15}
16
17declare namespace Agent {
18 export interface Options extends Pool.Options {
19 /** Default: `(origin, opts) => new Pool(origin, opts)`. */
20 factory?(origin: string | URL, opts: Object): Dispatcher;
21 /** Integer. Default: `0` */
22 maxRedirections?: number;
23
24 interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"]
25 }
26
27 export interface DispatchOptions extends Dispatcher.DispatchOptions {
28 /** Integer. */
29 maxRedirections?: number;
30 }
31}
Note: See TracBrowser for help on using the repository browser.