From b44c36230869188a95ddab66036f13196114356f Mon Sep 17 00:00:00 2001 From: Dustin Campbell Date: Tue, 27 Jun 2017 10:32:14 -0700 Subject: [PATCH] Fix errors introduced with TypeScript 2.4 --- src/features/status.ts | 2 +- test/assets.test.ts | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/features/status.ts b/src/features/status.ts index 6f072b9..54b8255 100644 --- a/src/features/status.ts +++ b/src/features/status.ts @@ -135,7 +135,7 @@ export function reportDocumentStatus(server: OmniSharpServer): vscode.Disposable SourceFiles: string[]; } - let fileNames: vscode.DocumentSelector[] = []; + let fileNames: vscode.DocumentFilter[] = []; let label: string; function addProjectFileNames(project: Project) { diff --git a/test/assets.test.ts b/test/assets.test.ts index c6998c0..cd52f0a 100644 --- a/test/assets.test.ts +++ b/test/assets.test.ts @@ -40,7 +40,7 @@ suite("Asset generation: project.json", () => { let rootPath = path.resolve('testRoot'); let info = createDotNetWorkspaceInformation(rootPath, 'testApp.dll', 'netcoreapp1.0'); let generator = new AssetGenerator(info, rootPath); - let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ false), null, true); + let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ false), null, { disallowComments: true }); let programPath = launchJson[0].program; // ${workspaceRoot}/bin/Debug/netcoreapp1.0/testApp.dll @@ -52,7 +52,7 @@ suite("Asset generation: project.json", () => { let rootPath = path.resolve('testRoot'); let info = createDotNetWorkspaceInformation(path.join(rootPath, 'nested'), 'testApp.dll', 'netcoreapp1.0'); let generator = new AssetGenerator(info, rootPath); - let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ false), null, true); + let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ false), null, { disallowComments: true }); let programPath = launchJson[0].program; // ${workspaceRoot}/nested/bin/Debug/netcoreapp1.0/testApp.dll @@ -64,7 +64,7 @@ suite("Asset generation: project.json", () => { let rootPath = path.resolve('testRoot'); let info = createDotNetWorkspaceInformation(rootPath, 'testApp.dll', 'netcoreapp1.0'); let generator = new AssetGenerator(info, rootPath); - let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ true), null, true); + let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ true), null, { disallowComments: true }); let programPath = launchJson[0].program; // ${workspaceRoot}/bin/Debug/netcoreapp1.0/testApp.dll @@ -76,7 +76,7 @@ suite("Asset generation: project.json", () => { let rootPath = path.resolve('testRoot'); let info = createDotNetWorkspaceInformation(path.join(rootPath, 'nested'), 'testApp.dll', 'netcoreapp1.0'); let generator = new AssetGenerator(info, rootPath); - let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ true), null, true); + let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ true), null, { disallowComments: true }); let programPath = launchJson[0].program; // ${workspaceRoot}/nested/bin/Debug/netcoreapp1.0/testApp.dll @@ -85,7 +85,7 @@ suite("Asset generation: project.json", () => { }); }); -function createDotNetWorkspaceInformation(projectPath: string, compilationOutputAssemblyFile: string, targetFrameworkShortName: string, emitEntryPoint: boolean = true) : protocol.WorkspaceInformationResponse { +function createDotNetWorkspaceInformation(projectPath: string, compilationOutputAssemblyFile: string, targetFrameworkShortName: string, emitEntryPoint: boolean = true): protocol.WorkspaceInformationResponse { return { DotNet: { Projects: [ @@ -148,7 +148,7 @@ suite("Asset generation: csproj", () => { let rootPath = path.resolve('testRoot'); let info = createMSBuildWorkspaceInformation(path.join(rootPath, 'testApp.csproj'), 'testApp', 'netcoreapp1.0'); let generator = new AssetGenerator(info, rootPath); - let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ false), null, true); + let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ false), null, { disallowComments: true }); let programPath = launchJson[0].program; // ${workspaceRoot}/bin/Debug/netcoreapp1.0/testApp.dll @@ -160,7 +160,7 @@ suite("Asset generation: csproj", () => { let rootPath = path.resolve('testRoot'); let info = createMSBuildWorkspaceInformation(path.join(rootPath, 'nested', 'testApp.csproj'), 'testApp', 'netcoreapp1.0'); let generator = new AssetGenerator(info, rootPath); - let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ false), null, true); + let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ false), null, { disallowComments: true }); let programPath = launchJson[0].program; // ${workspaceRoot}/nested/bin/Debug/netcoreapp1.0/testApp.dll @@ -172,7 +172,7 @@ suite("Asset generation: csproj", () => { let rootPath = path.resolve('testRoot'); let info = createMSBuildWorkspaceInformation(path.join(rootPath, 'testApp.csproj'), 'testApp', 'netcoreapp1.0'); let generator = new AssetGenerator(info, rootPath); - let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ true), null, true); + let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ true), null, { disallowComments: true }); let programPath = launchJson[0].program; // ${workspaceRoot}/bin/Debug/netcoreapp1.0/testApp.dll @@ -184,7 +184,7 @@ suite("Asset generation: csproj", () => { let rootPath = path.resolve('testRoot'); let info = createMSBuildWorkspaceInformation(path.join(rootPath, 'nested', 'testApp.csproj'), 'testApp', 'netcoreapp1.0'); let generator = new AssetGenerator(info, rootPath); - let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ true), null, true); + let launchJson = parse(generator.createLaunchJson(/*isWebProject*/ true), null, { disallowComments: true }); let programPath = launchJson[0].program; // ${workspaceRoot}/nested/bin/Debug/netcoreapp1.0/testApp.dll @@ -193,7 +193,7 @@ suite("Asset generation: csproj", () => { }); }); -function createMSBuildWorkspaceInformation(projectPath: string, assemblyName: string, targetFrameworkShortName: string, isExe: boolean = true) : protocol.WorkspaceInformationResponse { +function createMSBuildWorkspaceInformation(projectPath: string, assemblyName: string, targetFrameworkShortName: string, isExe: boolean = true): protocol.WorkspaceInformationResponse { return { MsBuild: { SolutionPath: '',