@@ -2,6 +2,7 @@ import { DocNode, DocNodeKind, IDocNodeParameters } from './DocNode';
22import { DocSection } from './DocSection' ;
33import { StandardModifierTagSet } from '../details/StandardModifierTagSet' ;
44import { IModifierTagSetParameters } from '../details/ModifierTagSet' ;
5+ import { StandardTags } from '../details/StandardTags' ;
56import { DocBlock } from './DocBlock' ;
67import { DocInheritDocTag } from './DocInheritDocTag' ;
78import { StringBuilder } from '../emitters/StringBuilder' ;
@@ -88,6 +89,7 @@ export class DocComment extends DocNode {
8889 */
8990 public readonly modifierTagSet : StandardModifierTagSet ;
9091
92+ private _seeBlocks : DocBlock [ ] ;
9193 private _customBlocks : DocBlock [ ] ;
9294
9395 /**
@@ -106,6 +108,7 @@ export class DocComment extends DocNode {
106108 this . returnsBlock = undefined ;
107109 this . modifierTagSet = new StandardModifierTagSet ( { configuration : this . configuration } ) ;
108110
111+ this . _seeBlocks = [ ] ;
109112 this . _customBlocks = [ ] ;
110113 }
111114
@@ -114,13 +117,30 @@ export class DocComment extends DocNode {
114117 return DocNodeKind . Comment ;
115118 }
116119
120+ /**
121+ * The collection of all `@see` DocBlockTag nodes belonging to this doc comment.
122+ */
123+ public get seeBlocks ( ) : ReadonlyArray < DocBlock > {
124+ return this . _seeBlocks ;
125+ }
126+
117127 /**
118128 * The collection of all DocBlock nodes belonging to this doc comment.
119129 */
120130 public get customBlocks ( ) : ReadonlyArray < DocBlock > {
121131 return this . _customBlocks ;
122132 }
123133
134+ /**
135+ * Append an item to the seeBlocks collection.
136+ */
137+ public appendSeeBlock ( block : DocBlock ) : void {
138+ if ( ! StandardTags . see . isDefinitionOfTag ( block . blockTag ) ) {
139+ throw new Error ( "Provided block is not a @see block." ) ;
140+ }
141+ this . _seeBlocks . push ( block ) ;
142+ }
143+
124144 /**
125145 * Append an item to the customBlocks collection.
126146 */
@@ -139,6 +159,7 @@ export class DocComment extends DocNode {
139159 this . typeParams . count > 0 ? this . typeParams : undefined ,
140160 this . returnsBlock ,
141161 ...this . customBlocks ,
162+ ...this . seeBlocks ,
142163 this . inheritDocTag ,
143164 ...this . modifierTagSet . nodes
144165 ] ;
0 commit comments