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

README: make Future fromPromise example more easy to copy/paste #38

Merged
merged 1 commit into from Dec 21, 2019

Conversation

MoOx
Copy link
Contributor

@MoOx MoOx commented Aug 20, 2019

With map/mapError, it doesn't compile most of the time due to the fact that the map returns nothing expected by the compiler.
With tap/tapError, the example is more ready to use right away :)

With map/mapError, it doesn't compile most of the time due to the fact that the map returns nothing expected by the compiler.
With tap/tapError, the example is more ready to use right away :)
@coveralls
Copy link

Pull Request Test Coverage Report for Build 66

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.613%

Totals Coverage Status
Change from base Build 59: 0.0%
Covered Lines: 127
Relevant Lines: 137

💛 - Coveralls

1 similar comment
@coveralls
Copy link

coveralls commented Aug 20, 2019

Pull Request Test Coverage Report for Build 66

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.613%

Totals Coverage Status
Change from base Build 59: 0.0%
Covered Lines: 127
Relevant Lines: 137

💛 - Coveralls

@briangorman
Copy link
Collaborator

briangorman commented Aug 27, 2019

I'm not sure I follow, the return value in either case should be wrapped in a Future, so if your code cannot handle that, it won't compile either way,

Copy link
Collaborator

@scull7 scull7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@scull7
Copy link
Collaborator

scull7 commented Dec 8, 2019

@briangorman Perhaps it’s more usable because most people are using their initial promise with some side effecting code that ultimately expects a () unit return. (Think something like printing or an alert hello world.

@MoOx
Copy link
Contributor Author

MoOx commented Dec 19, 2019

@briangorman using .map + Js.log just doesn't really make sense, using tap it's more "ok" as it's just a log is, using a thing but not changing it. And if you use this with react for example, you are more likely to tap + use a setState, than using a map :)

@briangorman briangorman merged commit 136a06d into RationalJS:master Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants