Skip to content

Commit 8b8dba6

Browse files
author
Eric Amodio
committed
Fixes typescript compile error
1 parent 716f2f5 commit 8b8dba6

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/assets.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import * as vscode from 'vscode';
1111
import * as tasks from 'vscode-tasks';
1212
import {OmnisharpServer} from './omnisharp/server';
1313
import * as serverUtils from './omnisharp/utils';
14-
import * as protocol from './omnisharp/protocol.ts'
14+
import * as protocol from './omnisharp/protocol'
1515

1616
interface DebugConfiguration {
1717
name: string,
@@ -60,7 +60,7 @@ interface Paths {
6060

6161
function getPaths(): Paths {
6262
const vscodeFolder = path.join(vscode.workspace.rootPath, '.vscode');
63-
63+
6464
return {
6565
vscodeFolder: vscodeFolder,
6666
tasksJsonPath: path.join(vscodeFolder, 'tasks.json'),
@@ -83,7 +83,7 @@ function hasOperations(operations: Operations) {
8383
function getOperations() {
8484
const paths = getPaths();
8585

86-
return getBuildOperations(paths.tasksJsonPath).then(operations =>
86+
return getBuildOperations(paths.tasksJsonPath).then(operations =>
8787
getLaunchOperations(paths.launchJsonPath, operations));
8888
}
8989

@@ -95,7 +95,7 @@ function getBuildOperations(tasksJsonPath: string) {
9595
const text = buffer.toString();
9696
const tasksJson: tasks.TaskConfiguration = JSON.parse(text);
9797
const buildTask = tasksJson.tasks.find(td => td.taskName === 'build');
98-
98+
9999
resolve({ updateTasksJson: (buildTask === undefined) });
100100
});
101101
}
@@ -123,7 +123,7 @@ function getLaunchOperations(launchJsonPath: string, operations: Operations) {
123123
function promptToAddAssets() {
124124
return new Promise<boolean>((resolve, reject) => {
125125
const item = { title: 'Yes' }
126-
126+
127127
vscode.window.showInformationMessage('Required assets to build and debug are missing from your project. Add them?', item).then(selection => {
128128
return selection
129129
? resolve(true)
@@ -139,7 +139,7 @@ function computeProgramPath(projectData: TargetProjectData) {
139139
}
140140

141141
let result = '${workspaceRoot}';
142-
142+
143143
if (projectData.projectPath) {
144144
result = path.join(result, path.relative(vscode.workspace.rootPath, projectData.projectPath.fsPath));
145145
}
@@ -258,10 +258,10 @@ function addTasksJsonIfNecessary(projectData: TargetProjectData, paths: Paths, o
258258
if (!operations.addTasksJson) {
259259
return resolve();
260260
}
261-
261+
262262
const tasksJson = createTasksConfiguration(projectData);
263263
const tasksJsonText = JSON.stringify(tasksJson, null, ' ');
264-
264+
265265
return fs.writeFileAsync(paths.tasksJsonPath, tasksJsonText);
266266
});
267267
}
@@ -341,13 +341,13 @@ function hasWebServerDependency(targetProjectData: TargetProjectData): boolean {
341341
if (projectJsonObject == null) {
342342
return false;
343343
}
344-
344+
345345
for (var key in projectJsonObject.dependencies) {
346346
if (key.toLowerCase().startsWith("microsoft.aspnetcore.server")) {
347347
return true;
348348
}
349349
}
350-
350+
351351
return false;
352352
}
353353

@@ -360,7 +360,7 @@ function addLaunchJsonIfNecessary(projectData: TargetProjectData, paths: Paths,
360360
const isWebProject = hasWebServerDependency(projectData);
361361
const launchJson = createLaunchJson(projectData, isWebProject);
362362
const launchJsonText = JSON.stringify(launchJson, null, ' ');
363-
363+
364364
return fs.writeFileAsync(paths.launchJsonPath, launchJsonText);
365365
});
366366
}
@@ -369,23 +369,23 @@ export function addAssetsIfNecessary(server: OmnisharpServer) {
369369
if (!vscode.workspace.rootPath) {
370370
return;
371371
}
372-
372+
373373
return serverUtils.requestWorkspaceInformation(server).then(info => {
374374
// If there are no .NET Core projects, we won't bother offering to add assets.
375375
if ('DotNet' in info && info.DotNet.Projects.length > 0) {
376376
return getOperations().then(operations => {
377377
if (!hasOperations(operations)) {
378378
return;
379379
}
380-
380+
381381
promptToAddAssets().then(addAssets => {
382382
if (!addAssets) {
383383
return;
384384
}
385-
385+
386386
const data = findTargetProjectData(info.DotNet.Projects);
387387
const paths = getPaths();
388-
388+
389389
return fs.ensureDirAsync(paths.vscodeFolder).then(() => {
390390
return Promise.all([
391391
addTasksJsonIfNecessary(data, paths, operations),

0 commit comments

Comments
 (0)