Skip to content

Commit

Permalink
Fix broken installation of TS definition files for Deno. (#77)
Browse files Browse the repository at this point in the history
Fix wrong VS Code Extension ID.
Explicitly `await` (and catch) `deno.generateDtsForDeno`, so all definition files are in place, before the extension finishes activation phase.

fixes #74, #66, #62, #48
  • Loading branch information
denisbrodbeck authored Jun 6, 2020
1 parent c498b1c commit ff87426
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {

import { deno } from "./deno";

const denoExtensionId = "denoland.deno";
const denoExtensionId = "denoland.vscode-deno";
const pluginId = "typescript-deno-plugin";
const configurationSection = "deno";

Expand Down Expand Up @@ -252,10 +252,16 @@ export async function activate(context: vscode.ExtensionContext) {
outputChannel.appendLine("Found deno, version:");
outputChannel.appendLine(deno.versions.raw);
const config = vscode.workspace.getConfiguration();
deno.generateDtsForDeno(
getExtensionPath(denoExtensionId),
config.get("deno.unstable"),
);
try {
await deno.generateDtsForDeno(
getExtensionPath(denoExtensionId),
config.get("deno.unstable"),
);
} catch (error) {
outputChannel.appendLine(
`failed to generate Definition files for Deno: ${error}`,
);
}
}

function showStatusBarItem(show: boolean): void {
Expand Down

0 comments on commit ff87426

Please sign in to comment.