@@ -68,16 +68,22 @@ namespace ts {
6868 emitDetachedComments,
6969 } ;
7070
71+ function getLeadingComments ( range : Node , shouldSkipCommentsForNodeCallback ?: ( node : Node ) => boolean ) : CommentRange [ ] ;
72+ function getLeadingComments ( range : TextRange ) : CommentRange [ ] ;
7173 function getLeadingComments ( range : TextRange | Node , shouldSkipCommentsForNodeCallback ?: ( node : Node ) => boolean ) {
7274 if ( shouldSkipCommentsForNodeCallback && shouldSkipCommentsForNodeCallback ( < Node > range ) ) {
73- // If the node will not be emitted in JS, remove all the comments(normal, pinned and ///) associated with the node,
74- // unless it is a triple slash comment at the top of the file.
75+ // If the node will not be emitted in JS, remove all the comments (normal,
76+ // pinned and `///`) associated with the node, unless it is a triple slash
77+ // comment at the top of the file.
78+ //
7579 // For Example:
7680 // /// <reference-path ...>
7781 // declare var x;
7882 // /// <reference-path ...>
7983 // interface F {}
80- // The first /// will NOT be removed while the second one will be removed even though both nodes will not be emitted
84+ //
85+ // The first `///` will NOT be removed while the second one will be removed
86+ // even though both nodes will not be emitted.
8187 if ( range . pos === 0 ) {
8288 return filter ( getLeadingCommentsOfPosition ( 0 ) , isTripleSlashComment ) ;
8389 }
@@ -104,6 +110,8 @@ namespace ts {
104110 return false ;
105111 }
106112
113+ function getTrailingComments ( range : Node , shouldSkipCommentsForNodeCallback ?: ( node : Node ) => boolean ) : CommentRange [ ] ;
114+ function getTrailingComments ( range : TextRange ) : CommentRange [ ] ;
107115 function getTrailingComments ( range : TextRange | Node , shouldSkipCommentsForNodeCallback ?: ( node : Node ) => boolean ) {
108116 if ( shouldSkipCommentsForNodeCallback && shouldSkipCommentsForNodeCallback ( < Node > range ) ) {
109117 return undefined ;
0 commit comments