(entry: StackTraceEntry)
| 128 | } |
| 129 | |
| 130 | export async function openFileInEditor(entry: StackTraceEntry) { |
| 131 | const relative = entry.file.startsWith('/') |
| 132 | ? entry.file.slice(1) |
| 133 | : entry.file; |
| 134 | |
| 135 | await withLoader(() => |
| 136 | fetch( |
| 137 | `/__open-in-editor?file=${encodeURIComponent(relative)}:${entry.line}:${ |
| 138 | entry.column |
| 139 | }`, |
| 140 | ), |
| 141 | ); |
| 142 | } |
| 143 | |
| 144 | export function getSourceCodeFrame(entry: StackTraceEntry): string | null { |
| 145 | if (!entry.source || !entry.sourceMap) { |
no test coverage detected