Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useRequest 对默认参数的类型推导有问题 #2671

Open
linzhipeng98 opened this issue Nov 11, 2024 · 1 comment
Open

useRequest 对默认参数的类型推导有问题 #2671

linzhipeng98 opened this issue Nov 11, 2024 · 1 comment

Comments

@linzhipeng98
Copy link

const { data, error, loading } = useRequest(async(a = 1, b = 1) => {
  return null
});

这时候 ab 的类型为 any

@crazylxr
Copy link
Collaborator

a 和 b 是入参,在哪里需要消费入参的类型?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants