(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos)
| 114890 | return true; |
| 114891 | } |
| 114892 | function emitLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos) { |
| 114893 | if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos)) |
| 114894 | return; |
| 114895 | if (!hasWrittenComment) { |
| 114896 | ts.emitNewLineBeforeLeadingCommentOfPosition(getCurrentLineMap(), writer, rangePos, commentPos); |
| 114897 | hasWrittenComment = true; |
| 114898 | } |
| 114899 | // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space |
| 114900 | emitPos(commentPos); |
| 114901 | ts.writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); |
| 114902 | emitPos(commentEnd); |
| 114903 | if (hasTrailingNewLine) { |
| 114904 | writer.writeLine(); |
| 114905 | } |
| 114906 | else if (kind === 3 /* SyntaxKind.MultiLineCommentTrivia */) { |
| 114907 | writer.writeSpace(" "); |
| 114908 | } |
| 114909 | } |
| 114910 | function emitLeadingCommentsOfPosition(pos) { |
| 114911 | if (commentsDisabled || pos === -1) { |
| 114912 | return; |
no test coverage detected
searching dependent graphs…