Documentation - v1.0.0
    Preparing search index...

    Type Alias AsyncObject<T>

    AsyncObject: T & { ready?: Promise<void> }

    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

    const asyncNode: AsyncObject<Node> = {
    id: "node_1",
    name: "Person",
    ready: Promise.resolve() // resolves when node is fully loaded
    };