Skip to content

Refactor: Change createdAt type from string to Date #158

Description

@coderabbitai

Description

Currently, the createdAt field in the Product type is defined as a string. This can lead to comparison issues during sorting operations.

Changes needed

  1. Change the type of createdAt from string to Date in src/types/product.ts
  2. Update the sortProducts function in src/helpers/sortProducts.ts to handle Date objects correctly
  3. Update any related tests and type definitions

Context

Impact

This change will improve type safety and make date comparisons more reliable during sorting operations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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