* Render a section for a specific symbol kind.
( kind: string, symbols: MergedSymbol[], symbolLookup: SymbolLookup, )
| 71 | * Render a section for a specific symbol kind. |
| 72 | */ |
| 73 | async function renderKindSection( |
| 74 | kind: string, |
| 75 | symbols: MergedSymbol[], |
| 76 | symbolLookup: SymbolLookup, |
| 77 | ): Promise<string> { |
| 78 | const title = KIND_TITLES[kind] || kind |
| 79 | const lines: string[] = [] |
| 80 | const renderedSymbols = await Promise.all( |
| 81 | symbols.map(symbol => renderMergedSymbol(symbol, symbolLookup)), |
| 82 | ) |
| 83 | |
| 84 | lines.push(`<section class="docs-section" id="section-${kind}">`) |
| 85 | lines.push(`<h2 class="docs-section-title">${title}</h2>`) |
| 86 | lines.push(...renderedSymbols) |
| 87 | |
| 88 | lines.push(`</section>`) |
| 89 | |
| 90 | return lines.join('\n') |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Render a merged symbol (with all its overloads). |
no test coverage detected