Cannot select object type from wrapping object using parameter #52399
Labels
Experience Enhancement
Noncontroversial enhancements
Help Wanted
You can do this
Suggestion
An idea for TypeScript
Milestone
Bug Report
🔎 Search Terms
Deferred parameter select generic index
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
Errors as shown, TypeScript can't figure out that the contents of
ReturnType<>
are function types, when a generic type parameter from the left side of a type definition is used in the right side, though it can in the definition ofallAreFunctionsAsExpected
.🙂 Expected behavior
No errors in this example. All of the type definitions throwing errors should simplify to
string | number | boolean
in this toy example.The text was updated successfully, but these errors were encountered: