Merge pull request #13472 from Manish-Giri/fix/incorrect-return-type

Fix incorrect return type
This commit is contained in:
Nathan Shively-Sanders
2017-01-13 10:06:54 -08:00
committed by GitHub
+2 -2
View File
@@ -734,11 +734,11 @@ namespace ts {
return comments;
}
export function getLeadingCommentRanges(text: string, pos: number): CommentRange[] {
export function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined {
return reduceEachLeadingCommentRange(text, pos, appendCommentRange, undefined, undefined);
}
export function getTrailingCommentRanges(text: string, pos: number): CommentRange[] {
export function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined {
return reduceEachTrailingCommentRange(text, pos, appendCommentRange, undefined, undefined);
}