dojo / core

:rocket: Dojo 2 - language helpers and utilities.
http://dojo.io
Other
213 stars 58 forks source link

Adding object support to ExtensiblePromise.all, issue #211 #241

Closed rorticus closed 7 years ago

rorticus commented 7 years ago

Allowing object support in ExtensiblePromise.all and it's derivatives (Task.all) (issue #211 ).

return ExtensiblePromise.all({
    one: 1, two: Promise.resolve(2), three: new ExtensiblePromise((resolve) => {
        setTimeout(() => resolve(3), 100);
    })
}).then((results: any) => {
    // results = { one: 1, two: 2, three: 3 }
});

Note that for this to work in IE 10/11, we need this...

https://github.com/dojo/shim/pull/53

codecov-io commented 7 years ago

Current coverage is 94.72% (diff: 100%)

Merging #241 into master will increase coverage by 0.08%

@@             master       #241   diff @@
==========================================
  Files            31         31          
  Lines          1640       1648     +8   
  Methods          14         14          
  Messages          0          0          
  Branches        326        327     +1   
==========================================
+ Hits           1552       1561     +9   
+ Misses           28         27     -1   
  Partials         60         60          

Powered by Codecov. Last update 00b29b3...673c6a1