Skip to content

Hot/Cold promises #8

@ForbesLindesay

Description

@ForbesLindesay

I often find myself wanting to create promises that do nothing until you call then on them. Is it just me, or are other people doing this too? If other people are too then should we consider how we support this in resolvers.

Options:

  1. add an .onStart(fn) method to the resolver object (only viable option for Return a deferred #2)
  2. add options to delay calling fn when you create the promise new Promise(fn, {cold: true})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions