(filePath: string, location?: SourceLocation | null)
| 21 | } |
| 22 | |
| 23 | function formatSourceLink(filePath: string, location?: SourceLocation | null): string { |
| 24 | if (location) { |
| 25 | const locationString = location.start.column |
| 26 | ? `${filePath}:${location.start.line}:${location.start.column + 1}` |
| 27 | : `${filePath}:${location.start.line}` |
| 28 | return format.sourceReference(locationString) |
| 29 | } else { |
| 30 | return format.sourceReference(filePath) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | function getLineColumnOffset(text: string, startIndex: number) { |
| 35 | const preceedingText = text.substring(0, startIndex) |
no outgoing calls
no test coverage detected