Closed
Description
Avoid Widening Returned/Yielded Types in Const Contexts
- Idea is to do a specific check when widening.
- Feels like an ad-hoc fix is not the right one?
- Why doesn't the
const
context give you the non-widening literal type in the first place? - This is about const type paramerters - it's really more tied to ordering of when we decide to widen a function type.
- Could take a few views:
- This can be viewed as a suitable carve-out.
- This can be duped to Don't widen return types of function expressions #241, in which case
- search for a non-breaky more-ideal solution.
- say "won't fix"
- We mostly feel like this is desirable - not like you need a ton of explanation of what's happening.
- Conclusion: we're mostly inclined to take the PR, barring any implementation problems.
- Want tests for
- Overloads
- Async functions
- Async yields
- Want tests for