Skip to content

Commit d15a7df

Browse files
authored
Correct return type for onBeforeRequest and onAfterResponse (#610)
1 parent dc57adb commit d15a7df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ interface UploadOptions {
4040
overridePatchMethod?: boolean
4141
headers?: { [key: string]: string }
4242
addRequestId?: boolean
43-
onBeforeRequest?: (req: HttpRequest) => void
44-
onAfterResponse?: (req: HttpRequest, res: HttpResponse) => void
43+
onBeforeRequest?: (req: HttpRequest) => (void | Promise<void>)
44+
onAfterResponse?: (req: HttpRequest, res: HttpResponse) => (void | Promise<void>)
4545

4646
chunkSize?: number
4747
retryDelays?: number[]

0 commit comments

Comments
 (0)