Skip to content

Commit

Permalink
fix(plugin-request): default type for TParams
Browse files Browse the repository at this point in the history
  • Loading branch information
HomyeeKing committed May 13, 2024
1 parent 280b290 commit a4233db
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 a4233db

Please sign in to comment.