Skip to content

Commit

Permalink
fix(types): allow synchronous interceptors to be passed (#128)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Roe <[email protected]>
  • Loading branch information
yufanzheng0723 and danielroe authored Sep 26, 2022
1 parent daa7ca5 commit 46e8f3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export interface FetchOptions<R extends ResponseType = ResponseType> extends Omi
response?: boolean
retry?: number | false

onRequest?(ctx: FetchContext): Promise<void>
onRequestError?(ctx: FetchContext & { error: Error }): Promise<void>
onResponse?(ctx: FetchContext & { response: FetchResponse<R> }): Promise<void>
onResponseError?(ctx: FetchContext & { response: FetchResponse<R> }): Promise<void>
onRequest?(ctx: FetchContext): Promise<void> | void
onRequestError?(ctx: FetchContext & { error: Error }): Promise<void> | void
onResponse?(ctx: FetchContext & { response: FetchResponse<R> }): Promise<void> | void
onResponseError?(ctx: FetchContext & { response: FetchResponse<R> }): Promise<void> | void
}

export interface $Fetch {
Expand Down

0 comments on commit 46e8f3c

Please sign in to comment.