(result: Record<string, unknown>)
| 66 | } |
| 67 | |
| 68 | export function toDaemonWaitData(result: Record<string, unknown>): Record<string, unknown> { |
| 69 | return { |
| 70 | waitedMs: result.waitedMs, |
| 71 | ...(typeof result.text === 'string' ? { text: result.text } : {}), |
| 72 | ...(typeof result.selector === 'string' ? { selector: result.selector } : {}), |
| 73 | }; |
| 74 | } |
| 75 | |
| 76 | export function stripSelectorChain<T extends Record<string, unknown>>(result: T): T { |
| 77 | const { selectorChain: _selectorChain, ...publicResult } = result; |