File tree 2 files changed +5
-0
lines changed 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { expectAssignable } from "tsd" ;
2
2
import Undici from "../.." ;
3
3
import Dispatcher from "../../types/dispatcher" ;
4
+ import Interceptors from "../../types/interceptors" ;
4
5
5
6
expectAssignable < Dispatcher . DispatchInterceptor > ( Undici . createRedirectInterceptor ( { maxRedirections : 3 } ) )
7
+
8
+ expectAssignable < Dispatcher . ComposedDispatcher > ( new Dispatcher ( ) . compose ( [ Interceptors . dns ( { maxTTL : 2_000 } ) ] ) ) ;
9
+
Original file line number Diff line number Diff line change @@ -28,4 +28,5 @@ declare namespace Interceptors {
28
28
export function retry ( opts ?: RetryInterceptorOpts ) : Dispatcher . DispatcherComposeInterceptor
29
29
export function redirect ( opts ?: RedirectInterceptorOpts ) : Dispatcher . DispatcherComposeInterceptor
30
30
export function responseError ( opts ?: ResponseErrorInterceptorOpts ) : Dispatcher . DispatcherComposeInterceptor
31
+ export function dns ( opts ?: DNSInterceptorOpts ) : Dispatcher . DispatcherComposeInterceptor
31
32
}
You can’t perform that action at this time.
0 commit comments