• Asynchronously waits for a Kos Data Model to become ready for use.

    This utility function is used to ensure that a Kos Data Model is fully loaded and ready to be accessed before performing any operations on it.

    Parameters

    • dataModel: IKosDataModel

      The Kos Data Model to wait for readiness.

    Returns Promise<IKosDataModel>

    A promise that resolves to the same data model when it becomes ready.

    Name

    whenReady

    Version

    1.0.0

    Throws

    If the specified data model is not found or if it has no ID.

    Example

    // Wait for the 'dataModel' to become ready before using it.
    const dataModel = await whenReady(dataModel);