Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit 992f2ce

Browse files
committed
feat: render descriptions for args
1 parent b7b8f17 commit 992f2ce

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

utils/parser.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { sentenceCase } from "sentence-case";
2+
13
export interface SimpleToken {
24
indices: [number, number]; // [start, end], end is exclusive
35
value: string;
@@ -124,7 +126,9 @@ export function parseToSpecTokens(
124126
specTokens.push({
125127
...token,
126128
type: "argument",
127-
description: arg.description,
129+
description:
130+
arg.description ||
131+
(arg.name ? sentenceCase(arg.name) : undefined),
128132
});
129133
if (!arg.isVariadic) {
130134
if (

0 commit comments

Comments
 (0)