The type of the value stored.
Readonly[toThe well-known symbol Symbol.toStringTag used by Object.prototype.toString().
Returns 'LazyAsync' so that Object.prototype.toString.call(lazy) produces '[object LazyAsync]'.
Forces the evaluation of this lazy value and returns a promise to the result.
If the value has already been initialized, returns the cached value. If initialization is in progress, waits for it to complete. Otherwise, starts initialization.
A promise that resolves to the initialized value.
A value which is initialized asynchronously on the first access.
The initialization function can return
PromiseLike<T>orT. If multiple calls toforce()occur concurrently before initialization completes, only one initialization will run.Since
1.6.0
See
Lazy for sync-only lazy initialization
Example