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:
Suneet Tipirneni
2023-04-17 12:44:17 -04:00
committed by GitHub
parent 7d7972d239
commit 516c46117c
4 changed files with 51 additions and 9 deletions

View File

@@ -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}`;
}