-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
FunctionTemplate::GetFunction #119
Conversation
Codecov Report
@@ Coverage Diff @@
## master #119 +/- ##
==========================================
- Coverage 96.80% 96.79% -0.01%
==========================================
Files 12 12
Lines 438 437 -1
==========================================
- Hits 424 423 -1
Misses 9 9
Partials 5 5
Continue to review full report at Codecov.
|
promise.go
Outdated
|
||
// Then2 invokes one of the given functions when the promise is fulfilled or rejected. | ||
// The returned Promise resolves after the callback has finished execution. | ||
func (p *Promise) Then2(onFulfilled, onRejected FunctionCallback) *Promise { |
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.
Then2
is an odd API. Can we use a variadic function and do checks for one or two FunctionCallback passed in? ie:
func (p *Promise) Then2(onFulfilled, onRejected FunctionCallback) *Promise { | |
func (p *Promise) Then(cbs ...FunctionCallback) *Promise { |
I see this PR extends #118; ideally each PR should be independent of each other and based of the master branch. Makes it harder to review just the Function code vs Promise code. |
This allows you to instantiate a FunctionTemplate for a context.
Updated |
This allows you to instantiate a FunctionTemplate for a context.