(location: string)
| 71 | * Validates and parses a location string to a {@link SourceLocation} object |
| 72 | */ |
| 73 | export function parseLocationString(location: string): SourceLocation | undefined { |
| 74 | let [file, line, column] = location.split(':') as [string, string | number, string | number] |
| 75 | if ( |
| 76 | file && line && column && |
| 77 | typeof file === 'string' && |
| 78 | !isNaN((line = +line)) && |
| 79 | !isNaN((column = +column)) |
| 80 | ) { |
| 81 | return {file, line, column} |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | export function openSourceCode(target: TargetIDE | TargetURLFunction, data: SourceCodeData): void { |
| 86 | const url = getTargetURL(target, data) |
no outgoing calls
no test coverage detected
searching dependent graphs…