LazyPromise Class
A lazy evaluated promise. The execute function is delayed until the promise is used, e.g. await, then, catch ... The execute function is only called once. All calls are then proxied to the promise returned by the execute method.
This API is provided for existing users, but is not recommended for new users.
To use, import via @fluidframework/core-utils/legacy
.
For more information about our API support guarantees, see here.
Signature
export declare class LazyPromise<T> implements Promise<T>
Implements: Promise<T>
Type Parameters
Parameter | Description |
---|---|
T |
Constructors
Constructor | Alerts | Description |
---|---|---|
(constructor)(execute) | Alpha |
Constructs a new instance of the LazyPromise class |
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
[Symbol.toStringTag] | Alpha |
readonly |
string |
Constructor Details
(constructor)
Constructs a new instance of the LazyPromise
class
This API is provided for existing users, but is not recommended for new users.
For more information about our API support guarantees, see here.
Signature
constructor(execute: () => Promise<T>);
Parameters
Parameter | Type | Description |
---|---|---|
execute | () => Promise<T> |
Property Details
[Symbol.toStringTag]
This API is provided for existing users, but is not recommended for new users.
For more information about our API support guarantees, see here.
Signature
get [Symbol.toStringTag](): string;
Type: string