This commit is contained in:
MapleLeaf
2021-12-16 11:48:18 -06:00
parent 803252290d
commit e709e3acb5
33 changed files with 467 additions and 437 deletions

View File

@@ -0,0 +1,8 @@
import { setTimeout } from "node:timers/promises"
import type { MaybePromise } from "./types.js"
export async function waitFor(condition: () => MaybePromise<boolean>) {
while (!(await condition())) {
await setTimeout(100)
}
}