Register a listener to be notified when a context is cleared.
(listener: (contextId: SchedulerContextId) => void)
| 193 | |
| 194 | /** Register a listener to be notified when a context is cleared. */ |
| 195 | onClear(listener: (contextId: SchedulerContextId) => void): () => void { |
| 196 | this.clearListeners.add(listener) |
| 197 | return () => this.clearListeners.delete(listener) |
| 198 | } |
| 199 | |
| 200 | /** Check if a context has pending jobs. */ |
| 201 | hasPendingJobs(contextId: SchedulerContextId): boolean { |