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

Some questionable TypeScript code changes #343

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
7 changes: 6 additions & 1 deletion logger/frontend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@
}

private displayServerLogs(data: Response) {
console.log('in display');
const logMessage: string = 'in display';

Check failure on line 43 in logger/frontend/index.ts

View check run for this annotation

Aspect Workflows / Lint

ESLint found an issue

Type string trivially inferred from a string literal, remove type annotation. (@typescript-eslint/no-inferrable-types)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint provided a suggestion

Suggested change
const logMessage: string = 'in display';
const logMessage = 'in display';

try {

Check failure on line 44 in logger/frontend/index.ts

View check run for this annotation

Aspect Workflows / Lint

ESLint found an issue

Unnecessary try/catch wrapper. (no-useless-catch)
console.log(logMessage);
} catch (e) {
throw e;
}

const el: HTMLElement = document.getElementById('log_results')!;
el.innerHTML = '';
Expand Down
Loading