(value: number)
| 3625 | let passesDone = 0; |
| 3626 | let lastPct = -1; |
| 3627 | const emit = (value: number): void => { |
| 3628 | if (!onProgress) return; |
| 3629 | const v = Math.min(value, SYNTH_PROGRESS_STEPS); |
| 3630 | const pct = Math.floor((v / SYNTH_PROGRESS_STEPS) * 100); |
| 3631 | if (pct === lastPct) return; |
| 3632 | lastPct = pct; |
| 3633 | onProgress(v, SYNTH_PROGRESS_STEPS); |
| 3634 | }; |
| 3635 | // A single long pass otherwise parks the bar between steps; a pass that |
| 3636 | // takes this callback reports a 0..1 fraction of its own work, surfaced |
| 3637 | // here as fractional progress within its step. |
no test coverage detected