Represents an object that may require asynchronous initialization.
This type extends any object with an optional ready promise that resolves
when the object has finished its asynchronous initialization process. This is
useful for objects that need to load embeddings, fetch data, or perform other
async operations before being fully usable.
Type Parameters
T
The base type of the object
Type declaration
Optionalready?: Promise<void>
Promise that resolves when the object is ready for use
Example
constasyncNode: AsyncObject<Node> = { id:"node_1", name:"Person", ready:Promise.resolve() // resolves when node is fully loaded };
Represents an object that may require asynchronous initialization.
This type extends any object with an optional
ready
promise that resolves when the object has finished its asynchronous initialization process. This is useful for objects that need to load embeddings, fetch data, or perform other async operations before being fully usable.