Asaps
This class has a set of helper methods to handle Asaps:
this method resolves a passed value as an Asap synchronously
Input | |
value | Type: T required the callback to invoke |
Returns | |
Asap<T> | |
this method creates an Asap from a Promise
Input | |
promise | Type: Promise<T> required the Promise to create the Asap from |
name | Type: string optional name use mainly for logging purposes |
Returns | |
Asap<T> | |
this method creates a delayed asynchronous Asap from a the value and timeout provided
Input | Title |
value | Type: T | IProducer<T> required the value to create the Asap from |
ms | Type: number required the delay in milliseconds |
name | Type: string optional name use mainly for logging purposes |
Returns | Title |
Asap<T> | Content |
this method performs a fetch from the given url, and it wraps it up in an Asap
Input | Title |
url | Type: string required the url to fetch |
Returns | Title |
Asap<T> | Content |
this method lets you create a promise that will be resolved synchronously
Input | Title |
name | Type: string optional name use mainly for logging purposes |
nature | Type: FlowEventNature optional custom log nature |
Returns | Title |
[IConsumer<T>, Asap<T>] | The Asap returned can be resolved |
Last modified 3yr ago