Skip to content

Commit

Permalink
fix(plugin-request): default type for TParams (#6885)
Browse files Browse the repository at this point in the history
  • Loading branch information
HomyeeKing authored May 21, 2024
1 parent 280b290 commit 4865124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-request/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface RequestResult<R, P extends any[]> extends Result<R, P> {
request: (...args: P) => Promise<R>;
}

export function useRequest<TData, TParams extends any[]>(
export function useRequest<TData, TParams extends any[] = []>(
service: string | AxiosRequestConfig | Service<TData, TParams>,
options?: Options<TData, TParams>,
plugins?: Plugin<TData, TParams>[]) {
Expand Down

0 comments on commit 4865124

Please sign in to comment.