diff --git a/src/fetch.ts b/src/fetch.ts index 214593e..4ddbf7a 100644 --- a/src/fetch.ts +++ b/src/fetch.ts @@ -33,10 +33,10 @@ export interface FetchOptions extends Omi response?: boolean retry?: number | false - onRequest?(ctx: FetchContext): Promise - onRequestError?(ctx: FetchContext & { error: Error }): Promise - onResponse?(ctx: FetchContext & { response: FetchResponse }): Promise - onResponseError?(ctx: FetchContext & { response: FetchResponse }): Promise + onRequest?(ctx: FetchContext): Promise | void + onRequestError?(ctx: FetchContext & { error: Error }): Promise | void + onResponse?(ctx: FetchContext & { response: FetchResponse }): Promise | void + onResponseError?(ctx: FetchContext & { response: FetchResponse }): Promise | void } export interface $Fetch {