-
Notifications
You must be signed in to change notification settings - Fork 520
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
what is the diffrence between <T> and <T, _> #502
Comments
Hi @luckydog12, you can identify an example so your question can be answered precisely ! |
const clone = <T, _>(arr: T[]): T[] => [...arr] |
@luckydog12 <T, _> 相当于是2个参数类型的泛型约束,就像 <T, U> 写法一样,只是这里第二个参数类型约束没用上,因为你的示例代码只有一个参数,如果把你的示例改改,可能就好理解了。 |
i can't understand
The text was updated successfully, but these errors were encountered: