( result: Record<string, unknown>, )
| 101 | } |
| 102 | |
| 103 | function getResolvedTarget( |
| 104 | result: Record<string, unknown>, |
| 105 | ): { kind: 'ref'; ref: string } | { kind: 'selector'; selector: string } | undefined { |
| 106 | const target = result.target; |
| 107 | if (!target || typeof target !== 'object') return undefined; |
| 108 | const record = target as Record<string, unknown>; |
| 109 | if (record.kind === 'ref' && typeof record.ref === 'string') { |
| 110 | return { kind: 'ref', ref: record.ref }; |
| 111 | } |
| 112 | if (record.kind === 'selector' && typeof record.selector === 'string') { |
| 113 | return { kind: 'selector', selector: record.selector }; |
| 114 | } |
| 115 | return undefined; |
| 116 | } |
| 117 | |
| 118 | function normalizeDaemonRef(ref: string): string { |
| 119 | return ref.startsWith('@') ? ref.slice(1) : ref; |
no outgoing calls
no test coverage detected