Skip to content

Commit

Permalink
Add generic argument to AfterResponseHook TypeScript type (#1589)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
Filipe Medeiros and sindresorhus authored Jan 28, 2021
1 parent 0ec0c0f commit 6fc04a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/as-promise/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export interface PaginationOptions<T, R> {
};
}

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

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

0 comments on commit 6fc04a9

Please sign in to comment.