undici-types 6.8.0 → 6.10.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/dispatcher.d.ts +5 -0
- package/fetch.d.ts +1 -1
- package/package.json +1 -1
- package/retry-handler.d.ts +1 -1
package/dispatcher.d.ts
CHANGED
|
@@ -18,6 +18,9 @@ declare class Dispatcher extends EventEmitter {
|
|
|
18
18
|
/** Starts two-way communications with the requested resource. */
|
|
19
19
|
connect(options: Dispatcher.ConnectOptions): Promise<Dispatcher.ConnectData>;
|
|
20
20
|
connect(options: Dispatcher.ConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void;
|
|
21
|
+
/** Compose a chain of dispatchers */
|
|
22
|
+
compose(dispatchers: Dispatcher['dispatch'][]): Dispatcher.ComposedDispatcher;
|
|
23
|
+
compose(...dispatchers: Dispatcher['dispatch'][]): Dispatcher.ComposedDispatcher;
|
|
21
24
|
/** Performs an HTTP request. */
|
|
22
25
|
request(options: Dispatcher.RequestOptions): Promise<Dispatcher.ResponseData>;
|
|
23
26
|
request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void;
|
|
@@ -93,6 +96,8 @@ declare class Dispatcher extends EventEmitter {
|
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
declare namespace Dispatcher {
|
|
99
|
+
export interface ComposedDispatcher extends Dispatcher {}
|
|
100
|
+
export type DispatcherInterceptor = (dispatch: Dispatcher['dispatch']) => Dispatcher['dispatch'];
|
|
96
101
|
export interface DispatchOptions {
|
|
97
102
|
origin?: string | URL;
|
|
98
103
|
path: string;
|
package/fetch.d.ts
CHANGED
package/package.json
CHANGED
package/retry-handler.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ declare class RetryHandler implements Dispatcher.DispatchHandlers {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
declare namespace RetryHandler {
|
|
15
|
-
export type RetryState = { counter: number;
|
|
15
|
+
export type RetryState = { counter: number; };
|
|
16
16
|
|
|
17
17
|
export type RetryContext = {
|
|
18
18
|
state: RetryState;
|