0

I have a function which accepts another function as a parameter, so I can use it like

waitFor(something)

Where const something = async function(){...}

What if something was a function with a parameter? How would I use that with waitFor?

If I do waitFor(something(id) I get the error the fn described in waitFor is not a function. because something(id) is not a function but a function call right?

1 Answers1

0

waitFor(function(){ return something(id); });

Bharat
  • 1,192
  • 7
  • 14