web3-utilsFunctionspollTillDefinedpollTillDefined CallablepollTillDefined<T>(func: AsyncFunction<T, unknown>, interval: number): Promise<Exclude<T, undefined>>Repeatedly calls an async function with a given interval until the result of the function is defined (not undefined or null), or until a timeout is reached.Type parametersTParametersfunc: AsyncFunction<T, unknown>The function to call.interval: numberThe interval in milliseconds.Returns Promise<Exclude<T, undefined>>
Repeatedly calls an async function with a given interval until the result of the function is defined (not undefined or null), or until a timeout is reached.