(value: unknown, out: Set<string>)
| 91 | } |
| 92 | |
| 93 | function extractRecalledDocIdsFromValue(value: unknown, out: Set<string>): void { |
| 94 | if (typeof value === 'string') { |
| 95 | extractRecalledDocIdsFromComment(value, out); |
| 96 | extractRecalledDocIds(value, out); |
| 97 | return; |
| 98 | } |
| 99 | if (Array.isArray(value)) { |
| 100 | for (const item of value) extractRecalledDocIdsFromValue(item, out); |
| 101 | return; |
| 102 | } |
| 103 | if (value !== null && typeof value === 'object') { |
| 104 | for (const item of Object.values(value as Record<string, unknown>)) { |
| 105 | extractRecalledDocIdsFromValue(item, out); |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | function extractRecalledDocIds(text: string, out: Set<string>): void { |
| 111 | const START = '--- [teamai:recall:start] ---'; |
no test coverage detected