domenic at domenicdenicola.com (2014-03-02T22:31:11.975Z)
On Mon, Feb 24, 2014 at 10:13 AM, Jeff Morrison <lbljeffmo at gmail.com> wrote:
> ```js
> Promise.resolve('hai'); // Promise('hai')
> ```
If by the comment's notation you mean a promise whose fulfillment is "hai",
yes.
Note though that the call `Promise("hai")` doesn't do this.
> ```js
> Promise.resolve(Promise.resolve('hai')); // Promise('hai') <-- is that right? I'm not sure where we're at here
> ```
yes.
> ```js
> Promise.resolve('hai').then(function(value) {
> console.log(value); // prints 'hai'
> });
> ```
yes.
> ```
> Promise.resolve(Promise.resolve('hai')).then(function(value) {
> console.log(value); // prints 'hai'
> });
> ```
yes.
> ```js
> Promise.cast === undefined; // true
> ```
yes. A bit more informatively:
```js
'cast' in Promise; // false
```
> ```js
> Promise.prototype.chain === undefined; // true
> ```
yes. And likewise
```js
'chain' in Promise.prototype; // false
```
> PLEASE do not turn this into another debate thread, I'm really just
> looking for a tldr thread tracking the latest standing on that topic.
> If the standing changes again, feel free to update this thread -- but
> otherwise please keep discussion in the other thread.
;)
On Mon, Feb 24, 2014 at 10:13 AM, Jeff Morrison <lbljeffmo at gmail.com> wrote: > Ok, so I've read most of the "Promise.cast/Promise.resolve" thread and > it's gone back and forth and branched in topic several times...but now I'm > a bit confused as to where we sit (and navigating that thread again isn't > the most exciting idea). So can someone who's been following that thread > more closely please confirm for (or correct) me that the following is where > we sit at the moment: > > Promise.resolve('hai'); // Promise('hai') > If by the comment's notation you mean a promise whose fulfillment is "hai", yes. Note though that the call Promise("hai") doesn't do this. > Promise.resolve(Promise.resolve('hai')); // Promise('hai') <-- is that > right? I'm not sure where we're at here > yes. > > Promise.resolve('hai').then(function(value) { > console.log(value); // prints 'hai' > }); > yes. > > Promise.resolve(Promise.resolve('hai')).then(function(value) { > console.log(value); // prints 'hai' > }); > yes. > > Promise.cast === undefined; // true > yes. A bit more informatively: 'cast' in Promise; // false > Promise.prototype.chain === undefined; // true > yes. And likewise 'chain' in Promise.prototype; // false > > PLEASE do not turn this into another debate thread, I'm really just > looking for a tldr thread tracking the latest standing on that topic. > If the standing changes again, feel free to update this thread -- but > otherwise please keep discussion in the other thread. > ;) > > Thanks! > Jeff > _______________________________________________ > es-discuss mailing list > es-discuss at mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > -- Cheers, --MarkM -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140224/a4c94f3a/attachment.html>