@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
8 lines (7 loc) • 395 B
TypeScript
/**
* Call `callback` limited by `tryCount` amount of times with interval in `timeout` ms
* @returns Promise that will be resolved as soon as callback returns truthy value, or reject it by limit.
*/
export declare function tryUntil<T>(callback: () => T, tryCount?: number, timeout?: number): Promise<T>;
/** Alias for {@link tryUntil} */
export declare const promisifiedTry: typeof tryUntil;