From b7197c622f5aa6ac59b54539755f8c056391805c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 15 Aug 2023 18:21:18 +0300 Subject: [PATCH] Slot parameters apidoc updates on build-apidoc --- api-generator/build-apidoc.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api-generator/build-apidoc.js b/api-generator/build-apidoc.js index af2bd3e24..c5ec492ed 100644 --- a/api-generator/build-apidoc.js +++ b/api-generator/build-apidoc.js @@ -382,7 +382,11 @@ if (project) { } else { const childType = child.type.elementType ? child.type.elementType.name : child.type.name; - type += ` \t ${child.name}: ${childType}, // ${child.comment?.summary[0]?.text}\n `; + if (child.type?.declaration?.signatures) { + type += `\t ${child.name}: (${child.type?.declaration?.signatures[0]?.parameters[0].name}: ${child.type?.declaration?.signatures[0]?.parameters[0].type?.name}) => ${child.type?.declaration?.signatures[0].type?.name}, // ${child.type?.declaration?.signatures[0].comment.summary[0]?.text}\n`; + } else { + type += ` \t ${child.name}: ${childType}, // ${child.comment?.summary[0]?.text}\n `; + } } }); }