(title: string, items: DefinitionListItem[])
| 274 | } |
| 275 | |
| 276 | function renderMemberList(title: string, items: DefinitionListItem[]): string { |
| 277 | const lines: string[] = [] |
| 278 | |
| 279 | if (items.length === 0) { |
| 280 | return '' |
| 281 | } |
| 282 | |
| 283 | lines.push(`<div class="docs-members">`) |
| 284 | lines.push(`<h4>${title}</h4>`) |
| 285 | lines.push(`<dl>`) |
| 286 | for (const item of items) { |
| 287 | lines.push(`<dt><code>${escapeHtml(item.signature)}</code></dt>`) |
| 288 | if (item.description) { |
| 289 | lines.push(`<dd>${escapeHtml(item.description.split('\n')[0] ?? '')}</dd>`) |
| 290 | } |
| 291 | } |
| 292 | lines.push(`</dl>`) |
| 293 | lines.push(`</div>`) |
| 294 | |
| 295 | return lines.join('\n') |
| 296 | } |
| 297 | |
| 298 | /** |
| 299 | * Render class members (constructor, properties, methods). |
no test coverage detected