endojs / Jessie

Tiny subset of JavaScript for ocap-safe universal mobile code
Apache License 2.0
281 stars 16 forks source link

How can promises be used without `new`? #34

Closed christianbundy closed 4 years ago

christianbundy commented 4 years ago

I found this comment that explains how to create a promise without using new, but I'm sure there's a better way. The diagram in the readme seems to support Promise, but not new. Is there a recommended way to do this?

Thanks!

dckc commented 4 years ago

a makePromise library function is proposed in #29.

christianbundy commented 4 years ago

Interesting, thanks!