mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
fix(website): duplicate method in docs when interface merging (#10435)
This commit is contained in:
@@ -1788,18 +1788,20 @@ export class ApiModelGenerator {
|
|||||||
{
|
{
|
||||||
kind: type?.includes("'") ? ExcerptTokenKind.Content : ExcerptTokenKind.Reference,
|
kind: type?.includes("'") ? ExcerptTokenKind.Content : ExcerptTokenKind.Reference,
|
||||||
text: fixPrimitiveTypes(type ?? 'unknown', symbol),
|
text: fixPrimitiveTypes(type ?? 'unknown', symbol),
|
||||||
canonicalReference: type?.includes("'")
|
canonicalReference:
|
||||||
? undefined
|
type?.includes("'") || !astEntity
|
||||||
: DeclarationReference.package(pkg)
|
? undefined
|
||||||
.addNavigationStep(
|
: DeclarationReference.package(pkg)
|
||||||
Navigation.Members as any,
|
.addNavigationStep(
|
||||||
DeclarationReference.parseComponent(type ?? 'unknown'),
|
Navigation.Members as any,
|
||||||
)
|
DeclarationReference.parseComponent(type ?? 'unknown'),
|
||||||
.withMeaning(
|
)
|
||||||
(lookup[astSymbol?.astDeclarations.at(-1)?.declaration.kind ?? ts.SyntaxKind.ClassDeclaration] ??
|
.withMeaning(
|
||||||
'class') as Meaning,
|
(lookup[
|
||||||
)
|
astSymbol?.astDeclarations.at(-1)?.declaration.kind ?? ts.SyntaxKind.ClassDeclaration
|
||||||
.toString(),
|
] ?? 'class') as Meaning,
|
||||||
|
)
|
||||||
|
.toString(),
|
||||||
},
|
},
|
||||||
{ kind: ExcerptTokenKind.Content, text: symbol ?? '' },
|
{ kind: ExcerptTokenKind.Content, text: symbol ?? '' },
|
||||||
];
|
];
|
||||||
@@ -1867,7 +1869,7 @@ export class ApiModelGenerator {
|
|||||||
: `${method.access ? `${method.access} ` : ''}${method.scope === 'static' ? 'static ' : ''}${method.name}(`
|
: `${method.access ? `${method.access} ` : ''}${method.scope === 'static' ? 'static ' : ''}${method.name}(`
|
||||||
}${
|
}${
|
||||||
method.params?.length
|
method.params?.length
|
||||||
? `${method.params[0]!.name}${method.params[0]!.nullable || method.params[0]!.optional ? '?' : ''}`
|
? `${method.params[0]!.name}${method.params[0]!.nullable || method.params[0]!.optional ? '?' : ''}: `
|
||||||
: '): '
|
: '): '
|
||||||
}`,
|
}`,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export function resolveMembers<WantedItem extends ApiItem>(
|
|||||||
.getMergedSiblings()
|
.getMergedSiblings()
|
||||||
.filter((sibling) => sibling.containerKey !== parent.containerKey)
|
.filter((sibling) => sibling.containerKey !== parent.containerKey)
|
||||||
.flatMap((sibling) => (sibling as ApiItemContainerMixin).findMembersWithInheritance().items)
|
.flatMap((sibling) => (sibling as ApiItemContainerMixin).findMembersWithInheritance().items)
|
||||||
.filter((item) => predicate(item) && !seenItems.has(item.containerKey))
|
.filter((item) => predicate(item) && !seenItems.has(item.displayName))
|
||||||
.map((item) => ({
|
.map((item) => ({
|
||||||
item: item as WantedItem,
|
item: item as WantedItem,
|
||||||
inherited: item.parent ? (item.parent as ApiItemContainerMixin) : undefined,
|
inherited: item.parent ? (item.parent as ApiItemContainerMixin) : undefined,
|
||||||
|
|||||||
Reference in New Issue
Block a user