Asaps
Last updated
Last updated
This class has a set of helper methods to handle Asaps:
this method resolves a passed value as an Asap synchronously
this method creates an Asap from a Promise
this method creates a delayed asynchronous Asap from a the value and timeout provided
this method performs a fetch from the given url, and it wraps it up in an Asap
this method lets you create a promise that will be resolved synchronously
Input
value
Type: T
required
the callback to invoke
Returns
Asap<T>
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>
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
Input
Title
url
Type: string
required
the url to fetch
Returns
Title
Asap<T>
Content
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