-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: interceptors.d.ts has no default export (#3332)
* fix: types interceptors default export * test for bugs in typescript
- Loading branch information
Showing
6 changed files
with
16 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
import Dispatcher from "./dispatcher"; | ||
import RetryHandler from "./retry-handler"; | ||
|
||
export type DumpInterceptorOpts = { maxSize?: number } | ||
export type RetryInterceptorOpts = RetryHandler.RetryOptions | ||
export type RedirectInterceptorOpts = { maxRedirections?: number } | ||
export default Interceptors; | ||
|
||
export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export declare function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export declare function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export declare function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
declare namespace Interceptors { | ||
export type DumpInterceptorOpts = { maxSize?: number } | ||
export type RetryInterceptorOpts = RetryHandler.RetryOptions | ||
export type RedirectInterceptorOpts = { maxRedirections?: number } | ||
|
||
export function createRedirectInterceptor(opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters