Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using in ES6 environment #60

Closed
OliverJAsh opened this issue Oct 30, 2014 · 4 comments
Closed

Using in ES6 environment #60

OliverJAsh opened this issue Oct 30, 2014 · 4 comments

Comments

@OliverJAsh
Copy link

I'm interested in using this library purely for the superset features. I have an ES6 environment running with Traceur, so I do not need the polyfill.

I notice the extensions are in a separate module but they extend the polyfill’d Promise object. In my case, this object has already been polyfill’d and is available at global.Promise.

Should I be able to apply these extensions to my existing Promise object?

@ForbesLindesay
Copy link
Member

It's not currently possible, but we could add such support, perhaps by making the modules return a function that takes Promise as its argument, rather than having them load our promise implementation directly.

@OliverJAsh
Copy link
Author

@ForbesLindesay AFAICS, that would work. I'm currently just wrapping my ES6 Promises with Q to get the helper functions such as the ones provided herein.

@ForbesLindesay
Copy link
Member

You can of course wrap ES6 Promises with then/promise using Promise.resolve(value)

@edef1c
Copy link
Member

edef1c commented Dec 11, 2014

Closing this as a duplicate of #50.

@edef1c edef1c closed this as completed Dec 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants