Replies: 1 comment
-
Cool, thanks for your work. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There's a known issue with TypeScript and Generator-based APIs in that the
yield
expressions are typedany
(#2556). I just wanted to let you know that I've submitted a proposal (and a candidate implementation) for a fix, which you can find tin the following thread: microsoft/TypeScript#43632Under this proposal, you'd be able to annotate the yield expression results using the special
YieldType
marker, which would instruct TypeScript that, when passed through ayield
expression, the returned value is the generic parameter:At the moment the current blocker requires to show the TypeScript team that this feature would have a positive practical impact, so if that's something you're interested to ever see fixed I'd appreciate any feedback you could share! 🙂
Beta Was this translation helpful? Give feedback.
All reactions