Skip to content

Commit

Permalink
2 more type check added
Browse files Browse the repository at this point in the history
  • Loading branch information
hizir-bc authored and ishche committed Dec 21, 2023
1 parent 9fc56ee commit 7111e83
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe("LanguageClientService positive scenario", () => {
.mockReturnValue(9999);
try {
await languageClientService.checkPrerequisites();
} catch (error) {
} catch (error: any) {
message = error;
}
expect(message).toBeFalsy();
Expand Down Expand Up @@ -236,7 +236,7 @@ describe("LanguageClientService negative scenario.", () => {
(fs.existsSync as any) = jest.fn().mockReturnValue(false);
try {
await new LanguageClientService(jest.fn() as any).checkPrerequisites();
} catch (error) {
} catch (error: any) {
expect(error.toString()).toBe("Error: LSP server for cobol not found");
}
});
Expand Down
2 changes: 1 addition & 1 deletion clients/cobol-lsp-vscode-extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export async function activate(
} else {
await languageClientService.checkPrerequisites();
}
} catch (err) {
} catch (err: any) {
outputChannel.appendLine(err.toString());
languageClientService.enableNativeBuild();
TelemetryService.registerExceptionEvent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function createFileWithGivenPath(
fs.mkdirSync(ch4zPath, { recursive: true });
fs.writeFileSync(filePath, pattern);
}
} catch (e) {
} catch (e: any) {
vscode.window.showErrorMessage("File error: " + e.toString());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class CopybookDownloadService implements vscode.Disposable {
copybookProfile.profile,
isUSS,
);
} catch (error) {
} catch (error: any) {
if (CopybookDownloadService.isInvalidCredentials(error)) {
throw error;
}
Expand Down Expand Up @@ -194,7 +194,7 @@ export class CopybookDownloadService implements vscode.Disposable {
copybookprofile.profile,
isUSS,
);
} catch (err) {
} catch (err: any) {
if (CopybookDownloadService.needsUserNotification([copybookprofile])) {
vscode.window.showErrorMessage(err.message);
}
Expand Down Expand Up @@ -290,7 +290,7 @@ export class CopybookDownloadService implements vscode.Disposable {
}
}
await Promise.all(promises);
} catch (e) {
} catch (e: any) {
if (CopybookDownloadService.isInvalidCredentials(e)) {
throw e;
}
Expand All @@ -316,7 +316,7 @@ export class CopybookDownloadService implements vscode.Disposable {
if (fetchResult) {
this.updateDownloadProgress(progress, errors, cp);
}
} catch (e) {
} catch (e: any) {
if (CopybookDownloadService.isInvalidCredentials(e)) {
throw e;
}
Expand Down Expand Up @@ -571,7 +571,7 @@ export class CopybookDownloadService implements vscode.Disposable {
true,
);
}
} catch (e) {
} catch (e: any) {
let errorMessage = e.toString();
if (CopybookDownloadService.isInvalidCredentials(e)) {
errorMessage = INVALID_CREDENTIALS_ERROR_MSG.replace(
Expand Down
2 changes: 2 additions & 0 deletions clients/cobol-lsp-vscode-extension/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"alwaysStrict": true,
"strict": true,
"lib": ["es6"],
"module": "commonjs",
"moduleResolution": "node",
Expand Down

0 comments on commit 7111e83

Please sign in to comment.