1.0.8 • Published 8 years ago

@thatsmrtalbot/waitforit v1.0.8

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Build Status

Typescript WaitForIt

Promises that resolve when prompted

Usage

There are three methods "wait", "push" and "error".

Wait

Wait returns a promise that will resolve when a value is pushed to the waitforit instance.

For example:

let a = await waitforit.wait<string>("someid")

Push

Push pushes a result to all waiting promises with the same id specified.

For example:

waitforit.push("someid", "somevalue")

Error

Error pushes an error to all waiting promises with the same id specified.

For example:

waitforit.error("someid", new Error("something happened"))
1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago