(
onFinish: () => void,
onProgress?: (count: number, total: number) => void
)
| 52 | } |
| 53 | |
| 54 | registerCallback( |
| 55 | onFinish: () => void, |
| 56 | onProgress?: (count: number, total: number) => void |
| 57 | ) { |
| 58 | if (this.isFinished) { |
| 59 | onFinish(); |
| 60 | return; |
| 61 | } |
| 62 | this.onFinishCallbacks.push(onFinish); |
| 63 | if (onProgress) { |
| 64 | this.onProgressCallbacks.push(onProgress); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | onProgress(count: number, total: number) { |
| 69 | for (const onProgress of this.onProgressCallbacks) { |
no test coverage detected