diff --git a/src/functions/docs.ts b/src/functions/docs.ts index 50aa71c..750e0b0 100644 --- a/src/functions/docs.ts +++ b/src/functions/docs.ts @@ -259,8 +259,10 @@ function formatItem(_item: any, _package: string, version: string, member?: stri const lines: string[] = [[head, middlePart, tail].join(' ')]; const summary = item.summary?.summarySection; + const defaultValueBlock = item.summary?.defaultValueBlock; const deprecationNote = item.summary?.deprecatedBlock; const example = formatExample(item.summary?.exampleBlocks); + const defaultValue = defaultValueBlock ? formatSummary(defaultValueBlock, _package, version) : null; if (deprecationNote?.length) { lines.push(`${bold('[DEPRECATED]')} ${formatSummary(deprecationNote, _package, version)}`); @@ -274,6 +276,10 @@ function formatItem(_item: any, _package: string, version: string, member?: stri } } + if (defaultValue?.length) { + lines.push(`Default value: ${inlineCode(defaultValue)}`); + } + return lines.join('\n'); }