()
| 70 | let timer: ReturnType<typeof setTimeout> | undefined; |
| 71 | |
| 72 | const stopTimer = (): void => { |
| 73 | if (timer === undefined || startedAt === undefined) return; |
| 74 | clearTimeout(timer); |
| 75 | timer = undefined; |
| 76 | remainingMs = Math.max(0, remainingMs - (Date.now() - startedAt)); |
| 77 | startedAt = undefined; |
| 78 | }; |
| 79 | |
| 80 | const abortForTimeout = (): void => { |
| 81 | timer = undefined; |
no outgoing calls
no test coverage detected