| 1 | import { expectType } from 'tsd' |
| 2 | import { Dispatcher, interceptors, request } from '../../' |
| 3 | |
| 4 | async function exampleCode () { |
| 5 | const retry = interceptors.retry() |
| 6 | const rd = interceptors.redirect() |
| 7 | const dump = interceptors.dump() |
| 8 | |
| 9 | expectType<Dispatcher.DispatcherComposeInterceptor>(retry) |
| 10 | expectType<Dispatcher.DispatcherComposeInterceptor>(rd) |
| 11 | expectType<Dispatcher.DispatcherComposeInterceptor>(dump) |
| 12 | |
| 13 | await request('http://localhost:3000/foo') |
| 14 | } |
| 15 | |
| 16 | exampleCode() |