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)) {
|
||||
const [packageName, parentItem] = parent.canonicalReference.toString().split('!');
|
||||
const resolvedParent = resolveCanonicalReference(parent.canonicalReference, apiPackage);
|
||||
return {
|
||||
text: token.text,
|
||||
resolvedItem: {
|
||||
kind: 'TypeParameter',
|
||||
displayName: token.text,
|
||||
containerKey: `${parent.containerKey}|${token.text}`,
|
||||
uri: `${parentItem}#${token.text}`,
|
||||
packageName: packageName?.replace('@discordjs/', ''),
|
||||
uri: `${resolveItemURI(parent)}#${token.text}`,
|
||||
packageName: resolvedParent?.package?.replace('@discordjs/', ''),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user