• Watches the given path on the given object and invokes the callback when the value of the property becomes truthy.

    If the value of the property is already truthy, the callback will be invoked immediately.

    Type Parameters

    Parameters

    • obj: TObsv

      The object to watch.

    • path: TPath

      The property path to watch.

    • callback: (() => void)

      The callback to invoke when the property becomes truthy.

        • (): void
        • Returns void

    • Optionaloptions: WhenOptions

      Optional. The options to use for watching the property.

    Returns IHandle

  • Type Parameters

    • TObsv extends Observable
    • TPath extends `${string}.${string}.${string}.${string}`

    Parameters

    Returns IHandle