File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -138,15 +138,18 @@ export function getDefaultTypeFormatFlags(enclosingNode: Node) {
138138 return formatFlags ;
139139}
140140
141- export function getMainCommentOfNode (
142- node : Node ,
143- sourceFile : SourceFile
144- ) : string {
141+ export function getDocComment ( node : Node ) : DocComment {
145142 const tsdocParser : TSDocParser = new TSDocParser ( ) ;
146143 const parserContext : ParserContext = tsdocParser . parseString (
147144 node . getFullText ( )
148145 ) ;
149- const docComment : DocComment = parserContext . docComment ;
146+ return parserContext . docComment ;
147+ }
148+ export function getMainCommentOfNode (
149+ node : Node ,
150+ sourceFile : SourceFile
151+ ) : string {
152+ const docComment = getDocComment ( node ) ;
150153 return renderDocNode ( docComment . summarySection ) . trim ( ) ;
151154}
152155
@@ -168,11 +171,7 @@ export function parseCommentDocValue(docValue: string, type: ts.Type) {
168171}
169172
170173export function getTsDocTagsOfNode ( node : Node , typeChecker : TypeChecker ) {
171- const tsdocParser : TSDocParser = new TSDocParser ( ) ;
172- const parserContext : ParserContext = tsdocParser . parseString (
173- node . getFullText ( )
174- ) ;
175- const docComment : DocComment = parserContext . docComment ;
174+ const docComment = getDocComment ( node ) ;
176175
177176 const tagDefinitions : {
178177 [ key : string ] : {
You can’t perform that action at this time.
0 commit comments