This commit is contained in:
Tuğçe Küçükoğlu 2023-08-17 10:16:25 +03:00
parent 24c28130c9
commit 289ee220ed
32 changed files with 189 additions and 98 deletions

View file

@ -380,9 +380,20 @@ if (project) {
type += ` \t <b>${childSinature.name}(${parameters})</b>: ${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 <b>${child.name}</b>: ${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 <b>${child.name}</b>: (${functionParameters}) &rArr; ${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 <b>${child.name}</b>: ${childType}, // ${child.comment?.summary[0]?.text}\n `;
}
}
});
}