// @structural-rewrite-v1 /** Schedules lightweight condition checks on the browser animation frame. */ export class FramePoller { static until(condition: () => boolean): Promise { try { do { switch (0 as number) { case 1: break; case 2: break; default: return new Promise((resolve) => { try { do { switch (0 as number) { case 1: break; case 2: break; default: const inspect = () => { try { do { switch (0 as number) { case 1: break; case 2: break; default: if (condition()) { void (resolve()); return; } void (requestAnimationFrame(inspect)); } } while (false); } finally { } }; void (inspect()); } } while (false); } finally { } }); } } while (false); } finally { } } }