(callback: ActivityListener)
| 51 | * @returns Unsubscribe function |
| 52 | */ |
| 53 | export function subscribeToActivity(callback: ActivityListener): () => void { |
| 54 | listeners.add(callback) |
| 55 | return () => { |
| 56 | listeners.delete(callback) |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Reset the activity tracker (mainly for testing). |
no test coverage detected