(result: BackendAlertResult)
| 395 | } |
| 396 | |
| 397 | function normalizeAlertWaitResult(result: BackendAlertResult): SystemAlertCommandResult { |
| 398 | if (result.kind !== 'alertWait') { |
| 399 | throw new AppError('COMMAND_FAILED', 'system.alert wait returned an invalid backend result'); |
| 400 | } |
| 401 | return { |
| 402 | kind: 'alertWait', |
| 403 | action: 'wait', |
| 404 | alert: result.alert, |
| 405 | ...(result.waitedMs !== undefined ? { waitedMs: result.waitedMs } : {}), |
| 406 | ...(result.timedOut !== undefined ? { timedOut: result.timedOut } : {}), |
| 407 | ...successText(result.alert ? 'Alert visible' : 'Alert wait timed out'), |
| 408 | }; |
| 409 | } |
| 410 | |
| 411 | function normalizeAlertHandledResult( |
| 412 | action: Exclude<BackendAlertAction, 'get' | 'wait'>, |
no test coverage detected
searching dependent graphs…