docs-util: fix helper step settings (#10045)

This commit is contained in:
Shahed Nasser
2024-11-13 11:01:14 +02:00
committed by GitHub
parent 868b1c190f
commit 5fec006371
5 changed files with 30 additions and 4 deletions
+10 -3
View File
@@ -3,9 +3,16 @@ import { ArrayType, SignatureReflection, SomeType, UnionType } from "typedoc"
const disallowedIntrinsicTypeNames = ["unknown", "void", "any", "never"]
export function isWorkflowStep(reflection: SignatureReflection): boolean {
return (
reflection.parent?.children?.some((child) => child.name === "__step__") ||
false
if (reflection.parent?.children?.some((child) => child.name === "__step__")) {
return true
}
if (reflection.type?.type !== "intersection") {
return false
}
return reflection.type.types.some(
(refType) =>
refType.type === "reference" &&
refType.name === "StepFunctionReturnConfig"
)
}