(context: vscode.ExtensionContext)
| 277 | // the extentionUri is version specific so we can't reference it in tsconfig's |
| 278 | // (also in the future we might want to downlaod typedecls from) |
| 279 | async function updateTypeDecls(context: vscode.ExtensionContext) { |
| 280 | const typingsUriGlobal = vscode.Uri.joinPath(context.globalStorageUri, "/typings"); |
| 281 | try { |
| 282 | // clear the typings folder first |
| 283 | await vscode.workspace.fs.delete(typingsUriGlobal, { |
| 284 | recursive: true, |
| 285 | useTrash: false, |
| 286 | }); |
| 287 | } catch { } |
| 288 | await vscode.workspace.fs.createDirectory(typingsUriGlobal); |
| 289 | |
| 290 | await downloadTypeDecls(context); |
| 291 | |
| 292 | // const extensionTypings = vscode.Uri.joinPath(context.extensionUri, "/out/typings"); |
| 293 | // // await vscode.workspace.fs.createDirectory(typingsUriGlobal); |
| 294 | // await vscode.workspace.fs.copy(extensionTypings, typingsUriGlobal); |
| 295 | // console.log(typingsUriGlobal); |
| 296 | } |
| 297 | |
| 298 | async function downloadTypeDecls(context: vscode.ExtensionContext): Promise<void> { |
| 299 | const config = vscode.workspace.getConfiguration("botloader"); |
no test coverage detected