-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Comments
Master now uses TS 3, feel free to contribute! |
Merged
released in 4.8.0 / 5.8.0 |
Thanks for the PR! |
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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!
The text was updated successfully, but these errors were encountered: