mirror of
https://github.com/flynx/types.js.git
synced 2025-10-29 02:20:07 +00:00
notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4a356cdd51
commit
0595479171
14
Promise.js
14
Promise.js
@ -76,7 +76,6 @@ function(name){
|
||||
var IterablePromise =
|
||||
module.IterablePromise =
|
||||
object.Constructor('IterablePromise', Promise, {
|
||||
// XXX EXPEREMENTAL: STOP...
|
||||
get STOP(){
|
||||
return Array.STOP },
|
||||
|
||||
@ -356,6 +355,7 @@ object.Constructor('IterablePromise', Promise, {
|
||||
var list = this.__packed
|
||||
return ((i != 0 && i != -1)
|
||||
|| list instanceof Promise
|
||||
// XXX not sure if this is correct...
|
||||
|| list.at(i) instanceof Promise) ?
|
||||
(await this).at(i)
|
||||
// NOTE: we can only reason about first/last explicit elements,
|
||||
@ -453,6 +453,12 @@ object.Constructor('IterablePromise', Promise, {
|
||||
every: promiseProxy('every'),
|
||||
|
||||
|
||||
// this is defined globally as Promise.prototype.iter(..)
|
||||
//
|
||||
// for details see: PromiseMixin(..) below...
|
||||
//iter: function(handler=undefined){ ... },
|
||||
|
||||
|
||||
// promise api...
|
||||
//
|
||||
// Overload .then(..), .catch(..) and .finally(..) to return a plain
|
||||
@ -480,12 +486,6 @@ object.Constructor('IterablePromise', Promise, {
|
||||
: p },
|
||||
|
||||
|
||||
// this is defined globally as Promise.prototype.iter(.,)
|
||||
//
|
||||
// for details see: PromiseMixin(..) below...
|
||||
//iter: function(handler=undefined){ ... },
|
||||
|
||||
|
||||
// constructor...
|
||||
//
|
||||
// Promise.iter([ .. ])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user