1 export type ResolveAfterPromise = {
3 promise: Promise<void>;
6 export const resolveAfter = function (timesUntilResolve: number): ResolveAfterPromise {
10 if (timesUntilResolve <= 0) {
11 throw new Error('Resolve after requires a positive integer');
14 const promise: Promise<void> = new Promise((resolvePromise) => {
16 if (++currentValue === timesUntilResolve) {