Function
findCategory
(ref: ContainerReflection, id: number)
Source from the content-addressed store, hash-verified
| 15 | * @returns the reflection category string if found |
| 16 | */ |
| 17 | export function findCategory(ref: ContainerReflection, id: number) { |
| 18 | const category = ref.categories?.find((category) => |
| 19 | // TODO: Fix the type error if TypeDoc becomes more eloborate |
| 20 | (category.children as unknown as number[]).includes(id), |
| 21 | ); |
| 22 | return category?.title; |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * Find reflection summary. |
Tested by
no test coverage detected