mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
feat(website): use tsdoc parameter names wherever possible (#9413)
Co-authored-by: Noel <buechler.noel@outlook.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -3,9 +3,12 @@ import { ApiItemKind } from '@microsoft/api-extractor-model';
|
||||
import { useMemo } from 'react';
|
||||
import { Anchor } from '~/components/Anchor';
|
||||
import { ExcerptText } from '~/components/ExcerptText';
|
||||
import { resolveParameters } from '~/util/model';
|
||||
|
||||
function getShorthandName(method: ApiMethod | ApiMethodSignature) {
|
||||
return `${method.name}${method.isOptional ? '?' : ''}(${method.parameters.reduce((prev, cur, index) => {
|
||||
const params = resolveParameters(method);
|
||||
|
||||
return `${method.name}${method.isOptional ? '?' : ''}(${params.reduce((prev, cur, index) => {
|
||||
if (index === 0) {
|
||||
return `${prev}${cur.isOptional ? `${cur.name}?` : cur.name}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user