mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: returns for typescript parsing
This commit is contained in:
@@ -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})`;
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user