True when the reader has asked for at least one of the lenses this section answers.
(name: string, facets: ReadonlySet<Facet>)
| 431 | |
| 432 | /** True when the reader has asked for at least one of the lenses this section answers. */ |
| 433 | function sectionVisible(name: string, facets: ReadonlySet<Facet>): boolean { |
| 434 | const owners = SECTION_FACETS[name]; |
| 435 | // A section nobody claimed is shown: a new family should be visible by |
| 436 | // default rather than invisible until somebody remembers to map it. |
| 437 | return owners === undefined || owners.some(facet => facets.has(facet)); |
| 438 | } |
| 439 | |
| 440 | function labelsFor(terminology: TerminologyLevel): Readonly<Record<string, string>> { |
| 441 | return terminology === 'plain' ? SECTION_LABELS_PLAIN : SECTION_LABELS_TECHNICAL; |