Fix incorrect return type

This commit is contained in:
MANISH-GIRI 2017-01-13 12:53:21 -05:00
parent 1476d7e065
commit ebf36ac06b

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);
}