fix(docgen): fix up method return types

This commit is contained in:
iCrawl
2022-06-07 15:19:42 +02:00
parent 769ea0bfe7
commit 314d76e907

View File

@@ -26,7 +26,12 @@ export class DocumentedMethod extends DocumentedItem<Method> {
async: this.data.async,
generator: this.data.generator,
returns: this.data.returns?.length
? this.data.returns.map((p) => new DocumentedVarType(p, this.config).serialize())
? this.data.returns.map((p) =>
new DocumentedVarType(
{ names: p.type.names, description: p.description, nullable: p.nullable },
this.config,
).serialize(),
)
: undefined,
meta: new DocumentedItemMeta(this.data.meta, this.config).serialize(),
};