-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 type of function generic type param #51447
Comments
The type of
It's not |
Actually, this is my actual type function which resolves key chain of type. And I don't know how to make it work for generic
|
To simplify it, use this code to explain.
How to make |
@zyf0330 You can't. The type of |
Thanks. |
Bug Report
I cannot figure out what is the type of generic T in the below playground code.
The generic T param which extends a class in the function, seems to be the never type, but I think it shouldn't be.
🔎 Search Terms
function generic type type param extends never
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
🙁 Actual behavior
The generic T seems to be
never
type.🙂 Expected behavior
The generic T should be
object
orany
type.The text was updated successfully, but these errors were encountered: