mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(website): doc links to other packages (#9994)
* fix(website): doc links to other packages * fix: missing parameter * Apply suggestions from code review Co-authored-by: Almeida <almeidx@pm.me> --------- Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
@@ -1094,6 +1094,10 @@ export class ApiModelGenerator {
|
||||
fileColumn: sourceLocation.sourceFileColumn,
|
||||
});
|
||||
} else if (jsDoc) {
|
||||
if (jsDoc.inherited) {
|
||||
return;
|
||||
}
|
||||
|
||||
const methodOptions = this._mapMethod(jsDoc, parentApiItem.getAssociatedPackage()!.name);
|
||||
if (methodOptions.releaseTag === ReleaseTag.Internal || methodOptions.releaseTag === ReleaseTag.Alpha) {
|
||||
return; // trim out items marked as "@internal" or "@alpha"
|
||||
@@ -1802,7 +1806,7 @@ export class ApiModelGenerator {
|
||||
text: `${
|
||||
method.scope === 'global'
|
||||
? `export function ${method.name}(`
|
||||
: `${method.access}${method.scope === 'static' ? ' static' : ''} ${method.name}(`
|
||||
: `${method.access ? `${method.access} ` : ''}${method.scope === 'static' ? 'static ' : ''}${method.name}(`
|
||||
}${
|
||||
method.params?.length
|
||||
? `${method.params[0]!.name}${method.params[0]!.nullable || method.params[0]!.optional ? '?' : ''}`
|
||||
@@ -1853,8 +1857,8 @@ export class ApiModelGenerator {
|
||||
?.map((param) => ` * @param ${param.name} - ${this._fixLinkTags(param.description) ?? ''}\n`)
|
||||
.join('') ?? ''
|
||||
}${
|
||||
method.returns?.length && !Array.isArray(method.returns[0])
|
||||
? ` * @returns ${this._fixLinkTags(method.returns[0]!.description) ?? ''}\n`
|
||||
method.returns?.length && !Array.isArray(method.returns[0]) && method.returns[0]!.description
|
||||
? ` * @returns ${this._fixLinkTags(method.returns[0]!.description) ?? ''}`
|
||||
: ''
|
||||
}${method.examples?.map((example) => ` * @example\n * \`\`\`js\n * ${example}\n * \`\`\`\n`).join('') ?? ''}${
|
||||
method.deprecated
|
||||
|
||||
Reference in New Issue
Block a user