(command: QueuedCommand)
| 126 | * Defaults priority to 'next' (processed before task notifications). |
| 127 | */ |
| 128 | export function enqueue(command: QueuedCommand): void { |
| 129 | commandQueue.push({ ...command, priority: command.priority ?? 'next' }) |
| 130 | notifySubscribers() |
| 131 | logOperation( |
| 132 | 'enqueue', |
| 133 | typeof command.value === 'string' ? command.value : undefined, |
| 134 | ) |
| 135 | } |
| 136 | |
| 137 | /** |
| 138 | * Add a task notification to the queue. |
no test coverage detected