head name -> description, from both the shell and built-in audit tables.
(decl: Declarations)
| 177 | |
| 178 | /** head name -> description, from both the shell and built-in audit tables. */ |
| 179 | function loadHeadDescriptions(decl: Declarations): Map<string, string> { |
| 180 | const out = new Map<string, string>(); |
| 181 | const harvest = (table: Record<string, any> | undefined) => { |
| 182 | if (!table) return; |
| 183 | for (const [name, rec] of Object.entries(table)) |
| 184 | if (rec && typeof rec.description === 'string' && rec.description.trim()) |
| 185 | out.set(name, rec.description.trim()); |
| 186 | }; |
| 187 | harvest(decl.declarations); |
| 188 | harvest((decl as any).existing); |
| 189 | return out; |
| 190 | } |
| 191 | |
| 192 | /** Curated synthetic entries (not in the upstream corpus). */ |
| 193 | function loadInjected(): Map<string, Entry> { |
no test coverage detected