Skip to content

Extended Use of any Breaking Type Guarantees #197

@Joaco2603

Description

@Joaco2603

Extended Use of any Breaking Type Guarantees

Description:

The extended and inappropriate use of the any type is weakening the codebase's type safety and breaking type guarantees.

Key Issues Found:

  • Numerous occurrences of any (grep any) detected, particularly within middlewares and Data Transfer Objects (DTOs).
  • Specific examples include properties like ProductVariantDTO.attributes?: any[].

Proposed Actions:

  1. Replace any with specific types or parameterized generics (<T>) to ensure strong type checking.
  2. Activate the TypeScript compiler options:
    • noImplicitAny: To prevent implicit use of any.
    • strictNullChecks: To handle null and undefined consistently and safely.

This refactoring is crucial for improving code quality, maintainability, and reliability by fully leveraging TypeScript's type system.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions