mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19: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() {
|
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) return this.constructor.name;
|
||||||
if (data.id) return `${data.id} (${this.constructor.name})`;
|
if (data.id) return `${data.id} (${this.constructor.name})`;
|
||||||
if (data.name) return `${data.name} (${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)));
|
const names = data.names?.map((name) => splitVarName(parseType(name)));
|
||||||
|
|
||||||
if (!data.description && !data.nullable) {
|
if (!data.description && !data.nullable) {
|
||||||
return names;
|
return [names];
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
types: names,
|
types: [names],
|
||||||
description: data.description,
|
description: data.description,
|
||||||
nullable: data.nullable,
|
nullable: data.nullable,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user