Skip to content
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

Take advantage of Typescript 3.6 Generators Improvments #2091

Closed
3 tasks done
RichiCoder1 opened this issue Aug 29, 2019 · 6 comments
Closed
3 tasks done

Take advantage of Typescript 3.6 Generators Improvments #2091

RichiCoder1 opened this issue Aug 29, 2019 · 6 comments

Comments

@RichiCoder1
Copy link

RichiCoder1 commented Aug 29, 2019

I have a (3) Idea:

  • What problem would it solve for you?
    • Flow as it stands isn't super great in typescript as a lot of type information get's lost in the process to to TS's previously less than great support. Now with the improvements to Iterator/Generator typings it should be possibly to greatly improve it.
  • Do you think others will benefit from this change as well and it should in core package (see also mobx-utils)?
    • Yes! This is a common pain point I see with mobx and more specific MST.
  • Are you willing to (attempt) a PR yourself?
    • I'd need some guidance as this'd be my first spelunking into the code, but yes!

Blog Link: https://devblogs.microsoft.com/typescript/announcing-typescript-3-6/#stricter-generators

@OshotOkill

This comment has been minimized.

@danielkcz
Copy link
Contributor

danielkcz commented Aug 29, 2019

@OshotOkill Please create a new issue if you have a specific problem instead of hijacking this one. Ideally, with a reproduction, a screenshot is far from enough.

@RichiCoder1 I don't use flow by myself much, but my concern here is if it's a backward compatible change. What happens to someone on TS 3.5 or lower? We definitely shouldn't force people to upgrade to latest hotness.

If you think it will be ok, go ahead and try to tackle it and don't be afraid to ask for help.

@spion
Copy link

spion commented Aug 29, 2019

The new feature is fairly basic and doesn't allow differentiation between different yield calls. As such it cannot be used to improve the types of mobx flow.

@RichiCoder1
Copy link
Author

You are correct :< microsoft/TypeScript#32523

@danielkcz
Copy link
Contributor

So I suppose we can close since it's not possible with 3.6 yet.

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants