Skip to content

Commit a08d18a

Browse files
committed
consolidate isInComment and getRangeOfEnclosingComment
1 parent a209db7 commit a08d18a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/utilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,9 +867,9 @@ namespace ts {
867867
export function isInComment(
868868
sourceFile: SourceFile,
869869
position: number,
870-
tokenAtPosition = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false),
870+
tokenAtPosition?: Node,
871871
predicate?: (c: CommentRange) => boolean): boolean {
872-
return !!formatting.getRangeOfEnclosingComment(sourceFile, position, /*onlyMultiLine*/ false, tokenAtPosition, predicate);
872+
return !!formatting.getRangeOfEnclosingComment(sourceFile, position, /*onlyMultiLine*/ false, /*precedingToken*/ undefined, tokenAtPosition, predicate);
873873
}
874874

875875
export function hasDocComment(sourceFile: SourceFile, position: number) {

0 commit comments

Comments
 (0)