(start, end, sourceFile, formatContext)
| 147042 | } |
| 147043 | formatting.formatDocument = formatDocument; |
| 147044 | function formatSelection(start, end, sourceFile, formatContext) { |
| 147045 | // format from the beginning of the line |
| 147046 | var span = { |
| 147047 | pos: ts.getLineStartPositionForPosition(start, sourceFile), |
| 147048 | end: end, |
| 147049 | }; |
| 147050 | return formatSpan(span, sourceFile, formatContext, 1 /* FormattingRequestKind.FormatSelection */); |
| 147051 | } |
| 147052 | formatting.formatSelection = formatSelection; |
| 147053 | /** |
| 147054 | * Validating `expectedTokenKind` ensures the token was typed in the context we expect (eg: not a comment). |
nothing calls this directly
no test coverage detected