Clear all scheduled jobs for a context.
(contextId: SchedulerContextId)
| 186 | |
| 187 | /** Clear all scheduled jobs for a context. */ |
| 188 | clear(contextId: SchedulerContextId): void { |
| 189 | this.contexts.delete(contextId) |
| 190 | // Notify listeners that this context was cleared |
| 191 | this.clearListeners.forEach((listener) => listener(contextId)) |
| 192 | } |
| 193 | |
| 194 | /** Register a listener to be notified when a context is cleared. */ |
| 195 | onClear(listener: (contextId: SchedulerContextId) => void): () => void { |