resolvable-value
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

resolvable-value

Use it when you want to take an argument that may be a Promise or may be a function or async function that returns a value of a given type.

Install

# Yarn
$ yarn add resolvable-value

# NPM
$ npm install --save resolvable-value

Usage

import { Resolvable, resolve } from "resolvable-value"

async function logResolvableValue(resolvableString: Resolvable<string>) {
  const value = await resolve(resolvableString)
  console.log(value)
}

Readme

Keywords

none

Package Sidebar

Install

npm i resolvable-value

Weekly Downloads

1,551

Version

1.0.2

License

MIT

Unpacked Size

5.92 kB

Total Files

12

Last publish

Collaborators

  • thesunny