(path: Path.Path, root: string, node: ts.Node)
| 36 | path.relative(root, location).split(path.sep).join("/") |
| 37 | |
| 38 | const sourceLocation = (path: Path.Path, root: string, node: ts.Node): SourceLocation => { |
| 39 | const source = node.getSourceFile() |
| 40 | const position = source.getLineAndCharacterOfPosition(node.getStart(source, false)) |
| 41 | return { |
| 42 | file: normalizedPath(path, root, source.fileName), |
| 43 | line: position.line + 1, |
| 44 | column: position.character + 1 |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | const modifiers = (node: ts.Node): ReadonlyArray<string> | undefined => { |
| 49 | if (!ts.canHaveModifiers(node)) { |
no test coverage detected