How can I defer a callback with no arguments in Iced Coffeescript? (Blocking call)

372 Views Asked by At

For example:

await Meteor.call "putCampaign", url, daily_budget, defer campaign_id

is a callback with a callback with a single argument.

How can I defer a call without a single argument?

In code, instead of:

callback(campaign_id)

The blocking call calls

callback()
1

There are 1 best solutions below

0
Dylan On BEST ANSWER

defer is a function that takes the place of the callback, so you simply would use defer()

await Meteor.call "putCampaign", url, daily_budget, defer()