Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS Type check - 2 new check added #2185

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading