Skip to content

Refactor: Explicit Any type clean up (part 4) #9430

@AlexeyGirin

Description

@AlexeyGirin

Problem:
Unspecified any.

Why is this an issue?
The any type in TypeScript is a dangerous "escape hatch" from the type system. Using any disables many type checking rules and is generally best used only as a last resort or when prototyping code. This rule reports on explicit uses of the any keyword as a type annotation.

How can it be fixed?
Preferable alternatives to any include:

  • If the type is known, describing it in an interface or type
  • If the type is not known, using the safer unknown type

Please check if types you you want to declare already exist and if no - create new declatations at types.ts if they can be used elsewhere (if yes - use existed one)

Problem locations:
packages/ketcher-react/src/script/ui/component/cliparea/cliparea.tsx:218
packages/ketcher-react/src/script/ui/component/cliparea/cliparea.tsx:302
packages/ketcher-react/src/script/ui/component/cliparea/cliparea.tsx:304
packages/ketcher-react/src/script/editor/tool/fragmentSelection.ts:41
packages/ketcher-react/src/script/editor/tool/fragmentSelection.ts:44
packages/ketcher-react/src/script/editor/tool/fragmentSelection.ts:47

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions