mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(website): correctly link type parameters in docs (#10801)
This commit is contained in:
@@ -295,15 +295,15 @@ function itemExcerptText(excerpt: Excerpt, apiPackage: ApiPackage, parent?: ApiT
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (parent?.typeParameters.some((type) => type.name === token.text)) {
|
if (parent?.typeParameters.some((type) => type.name === token.text)) {
|
||||||
const [packageName, parentItem] = parent.canonicalReference.toString().split('!');
|
const resolvedParent = resolveCanonicalReference(parent.canonicalReference, apiPackage);
|
||||||
return {
|
return {
|
||||||
text: token.text,
|
text: token.text,
|
||||||
resolvedItem: {
|
resolvedItem: {
|
||||||
kind: 'TypeParameter',
|
kind: 'TypeParameter',
|
||||||
displayName: token.text,
|
displayName: token.text,
|
||||||
containerKey: `${parent.containerKey}|${token.text}`,
|
containerKey: `${parent.containerKey}|${token.text}`,
|
||||||
uri: `${parentItem}#${token.text}`,
|
uri: `${resolveItemURI(parent)}#${token.text}`,
|
||||||
packageName: packageName?.replace('@discordjs/', ''),
|
packageName: resolvedParent?.package?.replace('@discordjs/', ''),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user