• Waits until the specified function "f" returns true to resume executation. Checks every "rate" milliseconds to see if f is true. Timeouts after "timeout" ms and returns "True" for timeout

    let timeout = await wait_until( f, 2000, 500 ) ;
    if (timeout) { ... } else { } ;

    Parameters

    • f: (() => boolean)
        • (): boolean
        • Returns boolean

    • Optionaltimeout: number
    • Optionalrate: number

    Returns Promise<unknown>