fix: returns for typescript parsing

This commit is contained in:
iCrawl
2022-06-08 18:41:22 +02:00
parent bc4fbcef2e
commit 5de9b80814
2 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ export class DocumentedItem<T = Item | DeclarationReflection> {
}
private detailedName() {
const data = this.data as Item | undefined;
const data = this.data as unknown as Item | undefined;
if (!data) return this.constructor.name;
if (data.id) return `${data.id} (${this.constructor.name})`;
if (data.name) return `${data.name} (${this.constructor.name})`;

View File

@@ -10,11 +10,11 @@ export class DocumentedVarType extends DocumentedItem<VarType> {
const names = data.names?.map((name) => splitVarName(parseType(name)));
if (!data.description && !data.nullable) {
return names;
return [names];
}
return {
types: names,
types: [names],
description: data.description,
nullable: data.nullable,
};