()
| 241 | } |
| 242 | |
| 243 | function cancelAll(): void { |
| 244 | // Bump all generations so in-flight doRefresh calls are invalidated. |
| 245 | for (const sessionId of generations.keys()) { |
| 246 | nextGeneration(sessionId) |
| 247 | } |
| 248 | for (const timer of timers.values()) { |
| 249 | clearTimeout(timer) |
| 250 | } |
| 251 | timers.clear() |
| 252 | failureCounts.clear() |
| 253 | } |
| 254 | |
| 255 | return { schedule, scheduleFromExpiresIn, cancel, cancelAll } |
| 256 | } |
nothing calls this directly
no test coverage detected