Skip to content

Extended promise objects #6

Open
@juandopazo

Description

Promise objects have only the then method and maybe a few other utility methods. But using promises for chaining asynchronous operations require more complex objects. For instance, jQuery's animate method should return a promise with an animate method so you can do $(selector).animate(opts1).animate(opts2).

I see two basic approaches to this: prototypical inheritance or "parasitic" inheritance (copying properties). How have you folks been dealing with this? What have you learned so far? Would you do anything differently?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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