-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This awesome! 🎉 Thanks for the PR.
I would have expected it to only perform side effects and for anything returned from its callback to be swallowed. If both behaviors are desired maybe that indicates an additional method like #map()?
I think that sounds right to me. I'm going to wait for a @cowboyd or @wwilsman review to figure out what we should do going forward. I don't think it has to hold this PR up either. But we should figure out what our follow up is
Confirm, not a blocker. |
It's mildly Monadic in so far as it allows you to change both the value and the context, similar to
The idea is to capture this sequence, so that it can be run again and again and again. But you're right. There are probably both |
I'll clarify what's going on with flattening the return value inside of A feature of convergences is currying the return value from a previous function in the stack to the next function in the stack. You can use convergences without returning anything, so it's an optional feature that other libraries like Support for flattening promise and convergence values inside of |
Thanks y'all. I will ponder this some more and open an issue to track this discussion. |
Awesome, I'm going to merge this. 🎉 |
Noice 🙌 |
So that BigTest can be used in TS projects. The
tsconfig.json
is for IntelliSense which aids in the creation/maintenance of the type declaration files.This exports the
IStats
interface andAssertion
andSideEffect
function types from theindex.d.ts
file since those are public APIs.SideEffect
is the type signature for the callback passed toConvergence#do()
and I thought it was odd that#do()
, although intended for side-effects, can perform side-effects and passes on the return value in the newConvergence
it returns—unless I misinterpreted what's going on. I would have expected it to only perform side effects and for anything returned from its callback to be swallowed. If both behaviors are desired maybe that indicates an additional method like#map()
?