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

Upgrade to TS 3 and improve flow() typing #1816

Closed
ismailhabib opened this issue Nov 19, 2018 · 5 comments
Closed

Upgrade to TS 3 and improve flow() typing #1816

ismailhabib opened this issue Nov 19, 2018 · 5 comments

Comments

@ismailhabib
Copy link

The flow() typing is suboptimal since you we have to choose to either provide the type of the output (and having to manually provide all the argument types), or have the argument types inferred but use Promise<any> for the output. Inferring is also not possible due to the typing of Generator (this is a long discussion in TS project but it's a different matter).

Fortunately, with TS 3 there is this new generic rest parameters which not only will improve the typing but also make it much simpler. See: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#generic-rest-parameters. I'm willing to create an MR once mobx is upgraded to TS 3.

Thanks!

@mweststrate
Copy link
Member

Master now uses TS 3, feel free to contribute!

@ismailhabib
Copy link
Author

#1825

@mweststrate
Copy link
Member

released in 4.8.0 / 5.8.0

@mweststrate
Copy link
Member

Thanks for the PR!

@lock
Copy link

lock bot commented Jul 21, 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 Jul 21, 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

2 participants