(path: string)
| 143 | } |
| 144 | |
| 145 | async function showTextDocument(path: string) { |
| 146 | // We're trying to open the file even if it doesn't exist yet. |
| 147 | // Because the following seems to be very slow: |
| 148 | // // onFileChangeOnce( |
| 149 | // // context, |
| 150 | // // fs, |
| 151 | // // mainFile, |
| 152 | // // (e) => void showTextDocument(e.uri.path) |
| 153 | // // ); |
| 154 | // It's causing some errors in the console, but in the end it provides better UX. |
| 155 | await window.showTextDocument( |
| 156 | Uri.from({ scheme: "memfs", path: "/" + path }) |
| 157 | ); |
| 158 | await commands.executeCommand( |
| 159 | "workbench.files.action.showActiveFileInExplorer" |
| 160 | ); |
| 161 | } |
| 162 | |
| 163 | const byPathLength = ( |
| 164 | a: [string, ...unknown[]], |
no outgoing calls
no test coverage detected