undici-types 6.2.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/balanced-pool.d.ts +11 -0
- package/client.d.ts +11 -0
- package/dispatcher.d.ts +1 -0
- package/package.json +1 -1
- package/pool.d.ts +11 -0
- package/proxy-agent.d.ts +0 -2
package/balanced-pool.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ import { URL } from 'url'
|
|
|
4
4
|
|
|
5
5
|
export default BalancedPool
|
|
6
6
|
|
|
7
|
+
type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
|
|
8
|
+
|
|
7
9
|
declare class BalancedPool extends Dispatcher {
|
|
8
10
|
constructor(url: string | string[] | URL | URL[], options?: Pool.Options);
|
|
9
11
|
|
|
@@ -15,4 +17,13 @@ declare class BalancedPool extends Dispatcher {
|
|
|
15
17
|
closed: boolean;
|
|
16
18
|
/** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
|
|
17
19
|
destroyed: boolean;
|
|
20
|
+
|
|
21
|
+
// Override dispatcher APIs.
|
|
22
|
+
override connect(
|
|
23
|
+
options: BalancedPoolConnectOptions
|
|
24
|
+
): Promise<Dispatcher.ConnectData>;
|
|
25
|
+
override connect(
|
|
26
|
+
options: BalancedPoolConnectOptions,
|
|
27
|
+
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
|
|
28
|
+
): void;
|
|
18
29
|
}
|
package/client.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { TlsOptions } from 'tls'
|
|
|
3
3
|
import Dispatcher from './dispatcher'
|
|
4
4
|
import buildConnector from "./connector";
|
|
5
5
|
|
|
6
|
+
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
|
|
8
10
|
*/
|
|
@@ -14,6 +16,15 @@ export class Client extends Dispatcher {
|
|
|
14
16
|
closed: boolean;
|
|
15
17
|
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
|
|
16
18
|
destroyed: boolean;
|
|
19
|
+
|
|
20
|
+
// Override dispatcher APIs.
|
|
21
|
+
override connect(
|
|
22
|
+
options: ClientConnectOptions
|
|
23
|
+
): Promise<Dispatcher.ConnectData>;
|
|
24
|
+
override connect(
|
|
25
|
+
options: ClientConnectOptions,
|
|
26
|
+
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
|
|
27
|
+
): void;
|
|
17
28
|
}
|
|
18
29
|
|
|
19
30
|
export declare namespace Client {
|
package/dispatcher.d.ts
CHANGED
package/package.json
CHANGED
package/pool.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import Dispatcher from "./dispatcher";
|
|
|
5
5
|
|
|
6
6
|
export default Pool
|
|
7
7
|
|
|
8
|
+
type PoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
|
|
9
|
+
|
|
8
10
|
declare class Pool extends Dispatcher {
|
|
9
11
|
constructor(url: string | URL, options?: Pool.Options)
|
|
10
12
|
/** `true` after `pool.close()` has been called. */
|
|
@@ -13,6 +15,15 @@ declare class Pool extends Dispatcher {
|
|
|
13
15
|
destroyed: boolean;
|
|
14
16
|
/** Aggregate stats for a Pool. */
|
|
15
17
|
readonly stats: TPoolStats;
|
|
18
|
+
|
|
19
|
+
// Override dispatcher APIs.
|
|
20
|
+
override connect(
|
|
21
|
+
options: PoolConnectOptions
|
|
22
|
+
): Promise<Dispatcher.ConnectData>;
|
|
23
|
+
override connect(
|
|
24
|
+
options: PoolConnectOptions,
|
|
25
|
+
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
|
|
26
|
+
): void;
|
|
16
27
|
}
|
|
17
28
|
|
|
18
29
|
declare namespace Pool {
|
package/proxy-agent.d.ts
CHANGED