mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-21 17:34:47 +12:00
fix(website): remove merged interface from sitemap (#10343)
This commit is contained in:
parent
02d196474a
commit
c5d40d3807
1 changed files with 15 additions and 5 deletions
|
@ -240,7 +240,12 @@ function itemExcerptText(excerpt: Excerpt, apiPackage: ApiPackage) {
|
||||||
// dapi-types doesn't have routes for class members
|
// dapi-types doesn't have routes for class members
|
||||||
// so we can assume this member is for an enum
|
// so we can assume this member is for an enum
|
||||||
if (meaning === 'member' && path && 'parent' in path) {
|
if (meaning === 'member' && path && 'parent' in path) {
|
||||||
|
// unless it's a variable like FormattingPatterns.Role
|
||||||
|
if (path.parent.toString() === '__type') {
|
||||||
|
href += `#${token.text.split('.')[0]}`;
|
||||||
|
} else {
|
||||||
href += `/enum/${path.parent}#${path.component}`;
|
href += `/enum/${path.parent}#${path.component}`;
|
||||||
|
}
|
||||||
} else if (meaning === 'type' || meaning === 'var') {
|
} else if (meaning === 'type' || meaning === 'var') {
|
||||||
href += `#${token.text}`;
|
href += `#${token.text}`;
|
||||||
} else {
|
} else {
|
||||||
|
@ -951,11 +956,16 @@ export async function generateSplitDocumentation({
|
||||||
|
|
||||||
const members = entry.members
|
const members = entry.members
|
||||||
.filter((item) => {
|
.filter((item) => {
|
||||||
if (item.kind !== 'Function') {
|
switch (item.kind) {
|
||||||
|
case ApiItemKind.Function:
|
||||||
|
return (item as ApiFunction).overloadIndex === 1;
|
||||||
|
case ApiItemKind.Interface:
|
||||||
|
return !entry.members.some(
|
||||||
|
(innerItem) => innerItem.kind === ApiItemKind.Class && innerItem.displayName === item.displayName,
|
||||||
|
);
|
||||||
|
default:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (item as ApiFunction).overloadIndex === 1;
|
|
||||||
})
|
})
|
||||||
.map((item) => ({
|
.map((item) => ({
|
||||||
kind: item.kind,
|
kind: item.kind,
|
||||||
|
|
Loading…
Reference in a new issue