@wesley-clements/promise.props
v1.0.1
Published
Adds type-safe Bluebird like `Promise.props` to the native `Promise`.
Downloads
1
Readme
Promise.props
Adds type-safe Bluebird like Promise.props
to the native Promise
.
Just import like so before you want to use it
import '@wesley-clements/promise.props';
Then you can use Promise.props
anywhere afterwards.
This example
Promise
.props({
number: Promise.resolve(1),
string: Promise.resolve("hello"),
})
.then(console.log)
will print out
{
number: 1,
string: "hello"
}