Skip to content

Commit

Permalink
Update hooks.ts (#7033)
Browse files Browse the repository at this point in the history
去掉默认空数组的赋值,避免 ts 报错
  • Loading branch information
lxzy-yun authored Dec 18, 2024
1 parent 2f438a2 commit 7be0321
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 @@ -8,7 +8,7 @@ interface RequestResult<R, P extends any[]> extends Result<R, P> {
requestAsync: Result<R, P>['runAsync'];
}

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 7be0321

Please sign in to comment.