Skip to content

Commit 6fc04a9

Browse files
Filipe Medeirossindresorhus
Filipe Medeiros
andauthoredJan 28, 2021
Add generic argument to AfterResponseHook TypeScript type (#1589)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
1 parent 0ec0c0f commit 6fc04a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎source/as-promise/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export interface PaginationOptions<T, R> {
121121
};
122122
}
123123

124-
export type AfterResponseHook = (response: Response, retryWithMergedOptions: (options: Options) => CancelableRequest<Response>) => Response | CancelableRequest<Response> | Promise<Response | CancelableRequest<Response>>;
124+
export type AfterResponseHook<ResponseType = unknown> = (response: Response<ResponseType>, retryWithMergedOptions: (options: Options) => CancelableRequest<Response>) => Response | CancelableRequest<Response> | Promise<Response | CancelableRequest<Response>>;
125125

126126
// These should be merged into Options in core/index.ts
127127
export namespace PromiseOnly {

0 commit comments

Comments
 (0)
Please sign in to comment.