mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Refactor #4274
This commit is contained in:
parent
24c28130c9
commit
289ee220ed
32 changed files with 189 additions and 98 deletions
|
@ -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}) ⇒ ${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 `;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue