Move helper to services/utilities

This commit is contained in:
Andy Hanson
2017-01-09 13:51:25 -08:00
parent 2124fcf588
commit 463626d56f
2 changed files with 4 additions and 4 deletions

View File

@@ -4318,10 +4318,6 @@ namespace ts {
return createTextSpan(start, end - start);
}
export function createTextSpanFromNode(node: Node, sourceFile?: SourceFile): TextSpan {
return createTextSpanFromBounds(node.getStart(sourceFile), node.getEnd());
}
export function textChangeRangeNewSpan(range: TextChangeRange) {
return createTextSpan(range.span.start, range.newLength);
}

View File

@@ -1112,6 +1112,10 @@ namespace ts {
return !tripleSlashDirectivePrefixRegex.test(commentText);
}
}
export function createTextSpanFromNode(node: Node, sourceFile?: SourceFile): TextSpan {
return createTextSpanFromBounds(node.getStart(sourceFile), node.getEnd());
}
}
// Display-part writer helpers