mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: Ensure returns for function type definitions (#8346)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { Type } from './index.js';
|
||||
|
||||
export interface VarType extends Type {
|
||||
type?: Required<Type>;
|
||||
description?: string;
|
||||
nullable?: boolean;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export class DocumentedVarType extends DocumentedItem<VarType> {
|
||||
}
|
||||
|
||||
const data = this.data;
|
||||
const names = data.names?.map((name) => splitVarName(name));
|
||||
const names = (data.names ?? data.type?.names)?.map((name) => splitVarName(name));
|
||||
|
||||
if (!data.description && !data.nullable) {
|
||||
return names;
|
||||
|
||||
Reference in New Issue
Block a user