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

FunctionTemplate::GetFunction #119

Merged
merged 1 commit into from
May 8, 2021
Merged

Conversation

robfig
Copy link
Contributor

@robfig robfig commented Apr 18, 2021

This allows you to instantiate a FunctionTemplate for a context.

@codecov
Copy link

codecov bot commented Apr 18, 2021

Codecov Report

Merging #119 (f98921a) into master (69de0c5) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head f98921a differs from pull request most recent head 5e9dc15. Consider uploading reports for the commit 5e9dc15 to get more accurate results
Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
context.go 94.36% <100.00%> (ø)
function_template.go 100.00% <100.00%> (ø)
promise.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69de0c5...5e9dc15. Read the comment docs.

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 {
Copy link
Owner

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:

Suggested change
func (p *Promise) Then2(onFulfilled, onRejected FunctionCallback) *Promise {
func (p *Promise) Then(cbs ...FunctionCallback) *Promise {

@rogchap
Copy link
Owner

rogchap commented Apr 21, 2021

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.

@rogchap
Copy link
Owner

rogchap commented Apr 22, 2021

Once we have #118 merged we can rebase and this PR should be good to merge too. Thanks again @robfig

@rogchap
Copy link
Owner

rogchap commented May 6, 2021

I've merged #118 (thanks @robfig)
Are you able to address the conflicts in this one?

This allows you to instantiate a FunctionTemplate for a context.
@robfig
Copy link
Contributor Author

robfig commented May 7, 2021

Updated

@rogchap rogchap merged commit 7a6d001 into rogchap:master May 8, 2021
macournoyer pushed a commit to Shopify/v8go that referenced this pull request May 10, 2021
genevieve pushed a commit to Shopify/v8go that referenced this pull request Jul 20, 2021
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.

2 participants