(command: QueuedCommand)
| 140 | * is never starved by system messages. |
| 141 | */ |
| 142 | export function enqueuePendingNotification(command: QueuedCommand): void { |
| 143 | commandQueue.push({ ...command, priority: command.priority ?? 'later' }) |
| 144 | notifySubscribers() |
| 145 | logOperation( |
| 146 | 'enqueue', |
| 147 | typeof command.value === 'string' ? command.value : undefined, |
| 148 | ) |
| 149 | } |
| 150 | |
| 151 | const PRIORITY_ORDER: Record<QueuePriority, number> = { |
| 152 | now: 0, |
no test coverage detected