We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeScript Version: 3.9.5
Search Terms: return type of function with generic type unknown
Code
type Func = <T = string>() => T; type R = ReturnType<Func>;
Expected behavior: type R = string
type R = string
Actual behavior: type R = unknown
type R = unknown
Playground Link: https://www.typescriptlang.org/play/index.html#code/C4TwDgpgBAYgrgOwMZQLxQDwBU1QM7ABOAlggOYB8AFAJRoVRYBQTokUASrhxMHIQizgIGeMgpMgA P.S. the typescript version of playground is 3.9.1, but this bug still exists in 3.9.5.
Related Issues: #26856
The text was updated successfully, but these errors were encountered:
I am pretty sure duplicate of #37181
Sorry, something went wrong.
Thanks, seems this issue does be duplicated.
No branches or pull requests
TypeScript Version: 3.9.5
Search Terms: return type of function with generic type unknown
Code
Expected behavior:
type R = string
Actual behavior:
type R = unknown
Playground Link: https://www.typescriptlang.org/play/index.html#code/C4TwDgpgBAYgrgOwMZQLxQDwBU1QM7ABOAlggOYB8AFAJRoVRYBQTokUASrhxMHIQizgIGeMgpMgA
P.S. the typescript version of playground is 3.9.1, but this bug still exists in 3.9.5.
Related Issues: #26856
The text was updated successfully, but these errors were encountered: