coffeescripticed-coffeescript

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


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()

Solution

  • 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()