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

[Misc] Code style: get rid of 'any' types #688

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ClementEXWiki
Copy link
Contributor

Jira URL

N/A

Changes

Description

  • Remove usages of the any type

Clarifications

N/A

Screenshots & Video

N/A

Executed Tests

N/A

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • N/A

@manuelleduc manuelleduc self-assigned this Feb 20, 2025
@@ -20,7 +20,18 @@

import type { Storage } from "./storage";

export interface WikiConfig {
type ConfigObject = {
Copy link
Contributor

Choose a reason for hiding this comment

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

If you export something please define which version it was introduced in with the @since annotation.
An explanation of the type in the tsdoc is also preferable.

Comment on lines +79 to +94
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.id = object.id as any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.name = object.name as any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.source = object.source as any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.syntax = object.syntax as any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.html = object.html as any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.css = object.css as any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.js = object.js as any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.version = object.version as any;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure how this is better than simply definition the type of the object parameter as any

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants