/** * In case you might be polling for a condition before proceed * * const checkCondition = async () => polled_condition; * this will waitForTrue checkCondition to be true * const success = await waitForTrue(100, checkCondition, 1000); * Meaning every 100 milisecs will run checkCondition and on 1000 will timeout and return false * * Important Note: * if poll results is failure and shall stop polling, * it should return true and then results must be store elsewhere * * @param {number} time * @param {()=>Promise} conditionCheck * @param {} timeout=60000 * @returns Promise */ declare function waitForTrue(time: number, conditionCheck: () => Promise, timeout?: number): Promise; export default waitForTrue;