diff --git a/api-generator/build-apidoc.js b/api-generator/build-apidoc.js index af2bd3e24..963805b85 100644 --- a/api-generator/build-apidoc.js +++ b/api-generator/build-apidoc.js @@ -380,9 +380,20 @@ if (project) { type += ` \t ${childSinature.name}(${parameters}): ${childSinature.type?.name}, // ${childSinature.comment?.summary[0]?.text}\n `; } else { - const childType = child.type.elementType ? child.type.elementType.name : child.type.name; + if (child.type?.declaration?.signatures) { + let functionParameters = ''; - type += ` \t ${child.name}: ${childType}, // ${child.comment?.summary[0]?.text}\n `; + child.type?.declaration?.signatures[0]?.parameters.map((param, index) => { + if (index !== 0) functionParameters += `, `; + functionParameters += `${param.name}: ${param.type?.name}`; + }); + + type += `\t ${child.name}: (${functionParameters}) ⇒ ${child.type?.declaration?.signatures[0]?.type?.name}, // ${child.type?.declaration?.signatures[0]?.comment.summary[0]?.text}\n`; + } else { + const childType = child.type.elementType ? child.type.elementType.name : child.type.name; + + type += ` \t ${child.name}: ${childType}, // ${child.comment?.summary[0]?.text}\n `; + } } }); } diff --git a/assets/styles/layout/_doc.scss b/assets/styles/layout/_doc.scss index 837ce668c..8de1138fa 100644 --- a/assets/styles/layout/_doc.scss +++ b/assets/styles/layout/_doc.scss @@ -205,11 +205,16 @@ } } -.doc-section-buttons { +.doc-section-code-buttons { gap: .75rem; padding: .75rem 0 0; border-top-left-radius: 10px; border-top-right-radius: 10px; + + .p-button-label { + font-weight: normal; + font-size: 0.875rem; + } } .doc-section-code-tooltip .p-tooltip-text { @@ -224,17 +229,6 @@ } } - .p-button-label { - font-weight: normal; - font-size: 0.875rem; - } - - .doc-section-code-active { - .p-button-label { - font-weight: bold; - } - } - pre { margin: 0; } diff --git a/components/doc/DocSectionCode.vue b/components/doc/DocSectionCode.vue index 05e914dea..1ca9f9c84 100644 --- a/components/doc/DocSectionCode.vue +++ b/components/doc/DocSectionCode.vue @@ -1,14 +1,14 @@