()
| 197 | * Logs a dequeue operation for each command. |
| 198 | */ |
| 199 | export function dequeueAll(): QueuedCommand[] { |
| 200 | if (commandQueue.length === 0) { |
| 201 | return [] |
| 202 | } |
| 203 | |
| 204 | const commands = [...commandQueue] |
| 205 | commandQueue.length = 0 |
| 206 | notifySubscribers() |
| 207 | |
| 208 | for (const _cmd of commands) { |
| 209 | logOperation('dequeue') |
| 210 | } |
| 211 | |
| 212 | return commands |
| 213 | } |
| 214 | |
| 215 | /** |
| 216 | * Return the highest-priority command without removing it, or undefined if empty. |
nothing calls this directly
no test coverage detected