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

Improve handling of void in converted code #31

Open
zxbodya opened this issue Jul 6, 2021 · 0 comments
Open

Improve handling of void in converted code #31

zxbodya opened this issue Jul 6, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@zxbodya
Copy link
Owner

zxbodya commented Jul 6, 2021

TypeScript has both undefined and void types. But in flow there is only void, which is used for both use-cases.

Currently void type is not changed in converted code, however - in most cases it looks undefined can be more appropriate.

Suggestion is to replace void with undefined for all cases, except when it is a return type:

  • having void in function return type
  • Promise<void>
@zxbodya zxbodya added the enhancement New feature or request label Jul 6, 2021
@zxbodya zxbodya self-assigned this Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant