(fn: () => void)
| 32 | |
| 33 | const frames = new Set<number>() |
| 34 | const queue = (fn: () => void) => { |
| 35 | const id = requestAnimationFrame(() => { |
| 36 | frames.delete(id) |
| 37 | fn() |
| 38 | }) |
| 39 | frames.add(id) |
| 40 | } |
| 41 | const cancel = () => { |
| 42 | for (const id of frames) cancelAnimationFrame(id) |
| 43 | frames.clear() |
no test coverage detected