(node: Node)
| 121 | const rel = (p: string): string => p.replace(/\\/g, '/'); |
| 122 | |
| 123 | export function toNodeRef(node: Node): WireNodeRef { |
| 124 | const file = rel(node.filePath); |
| 125 | const ref: WireNodeRef = { |
| 126 | id: node.id, |
| 127 | kind: node.kind, |
| 128 | name: node.name, |
| 129 | qualifiedName: node.qualifiedName, |
| 130 | file, |
| 131 | line: node.startLine, |
| 132 | endLine: node.endLine, |
| 133 | language: node.language, |
| 134 | test: isTestFile(file), |
| 135 | }; |
| 136 | if (node.signature) ref.signature = node.signature; |
| 137 | if (node.isExported) ref.exported = true; |
| 138 | return ref; |
| 139 | } |
| 140 | |
| 141 | export function toNodeDetail(node: Node): WireNodeDetail { |
| 142 | const detail: WireNodeDetail = { |
no test coverage detected