Only preseve pinned comment at the top of file

This commit is contained in:
Yui T
2015-08-20 15:01:59 -07:00
parent 4b7e2b3139
commit 3f66968776
17 changed files with 361 additions and 2 deletions

View File

@@ -6923,11 +6923,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
}
function filterComments(ranges: CommentRange[], isTopOfFileComments: boolean, isEmittedNode=true): CommentRange[] {
// TODO (yuisu): comment
if (compilerOptions.removeComments) {
ranges = filter(ranges, isPinnedComments);
ranges = isTopOfFileComments ? filter(ranges, isPinnedComments) : [];
}
else {
// TODO (yuisu): comment
if (!isEmittedNode) {
ranges = isTopOfFileComments ? filter(ranges, isTripleSlashOrPinnedComments) : filter(ranges, isPinnedComments);
}