@wesley-clements/promise.props
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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"
}

Readme

Keywords

none

Package Sidebar

Install

npm i @wesley-clements/promise.props

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

2.71 kB

Total Files

5

Last publish

Collaborators

  • wesley-clements