docs: fix page title in reference pagesnot showing + refactor workflows reference (#10537)

* docs: fix references title + refactor workflow reference generation

* update references sidebar
This commit is contained in:
Shahed Nasser
2024-12-10 18:19:03 +02:00
committed by GitHub
parent 4ad9ac1e5f
commit 482929f74d
11 changed files with 159 additions and 53 deletions
+27 -1
View File
@@ -1,4 +1,12 @@
import { ReferenceType, SignatureReflection, SomeType } from "typedoc"
import {
DeclarationReflection,
ProjectReflection,
ReferenceType,
Reflection,
ReflectionKind,
SignatureReflection,
SomeType,
} from "typedoc"
export function isWorkflow(reflection: SignatureReflection): boolean {
return (
@@ -60,3 +68,21 @@ function isAllowedType(type: SomeType | undefined): boolean {
!disallowedIntrinsicTypeNames.includes(type.name))
)
}
export function findReflectionInNamespaces(
parent: ProjectReflection | DeclarationReflection,
childName: string
): Reflection | undefined {
let childReflection: Reflection | undefined
parent.getChildrenByKind(ReflectionKind.Namespace).some((namespace) => {
childReflection = namespace.getChildByName(childName)
if (!childReflection) {
childReflection = findReflectionInNamespaces(namespace, childName)
}
return childReflection !== undefined
})
return childReflection
}