@@ -273,6 +273,7 @@ export class MarkdownDocumenter {
273273 case ApiItemKind . Function :
274274 this . _writeParameterTables ( output , apiItem as ApiParameterListMixin ) ;
275275 this . _writeThrowsSection ( output , apiItem ) ;
276+ this . _writeDefaultValueSection ( output , apiItem ) ;
276277 break ;
277278 case ApiItemKind . Namespace :
278279 this . _writePackageOrNamespaceTables ( output , apiItem as ApiNamespace ) ;
@@ -285,10 +286,13 @@ export class MarkdownDocumenter {
285286 break ;
286287 case ApiItemKind . Property :
287288 case ApiItemKind . PropertySignature :
289+ this . _writeDefaultValueSection ( output , apiItem ) ;
288290 break ;
289291 case ApiItemKind . TypeAlias :
292+ this . _writeDefaultValueSection ( output , apiItem ) ;
290293 break ;
291294 case ApiItemKind . Variable :
295+ this . _writeDefaultValueSection ( output , apiItem ) ;
292296 break ;
293297 default :
294298 throw new Error ( 'Unsupported API item kind: ' + apiItem . kind ) ;
@@ -469,6 +473,30 @@ export class MarkdownDocumenter {
469473 }
470474 }
471475
476+ private _writeDefaultValueSection ( output : DocSection , apiItem : ApiItem ) : void {
477+ const configuration : TSDocConfiguration = this . _tsdocConfiguration ;
478+
479+ if ( apiItem instanceof ApiDocumentedItem ) {
480+ const tsdocComment : DocComment | undefined = apiItem . tsdocComment ;
481+
482+ if ( tsdocComment ) {
483+ // Write the @defaultValue blocks
484+ const defaultValueBlocks : DocBlock [ ] = tsdocComment . customBlocks . filter (
485+ ( x ) => x . blockTag . tagNameWithUpperCase === StandardTags . defaultValue . tagNameWithUpperCase
486+ ) ;
487+
488+ if ( defaultValueBlocks . length > 0 ) {
489+ const heading : string = 'Default Value' ;
490+ output . appendNode ( new DocHeading ( { configuration, title : heading } ) ) ;
491+
492+ for ( const defaultValueBlock of defaultValueBlocks ) {
493+ this . _appendSection ( output , defaultValueBlock . content ) ;
494+ }
495+ }
496+ }
497+ }
498+ }
499+
472500 /**
473501 * GENERATE PAGE: MODEL
474502 */
0 commit comments