Skip to content

Commit

Permalink
add union type to onRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
yufanzheng0723 committed Sep 22, 2022
1 parent 2044bf9 commit c442766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface FetchOptions<R extends ResponseType = ResponseType> extends Omi
response?: boolean
retry?: number | false

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

0 comments on commit c442766

Please sign in to comment.