Skip to content
This repository was archived by the owner on Aug 8, 2020. It is now read-only.
This repository was archived by the owner on Aug 8, 2020. It is now read-only.

Replace interfaces with real classes #143

@ghost

Description

Data that isn't coming from some external API but is created within the code itself, should not use interfaces but real classes.

Example:

interface ISearchData {
  title?: string;
  note?: string;
  primaryNumber?: string;
  secondaryNumber?: string;
  textRecognitionEnabled?: boolean;
  isInGroup?: boolean;
  dateFrom?: Date;
  dateTo?: Date;
  tags?: Array<string>;
}

When we switch to creating a real class for the object, the object itself can manage its status... For example the primary and secondary number can never be negative, or the order of dateFrom and dateTo needs to be consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfrontendOnly relevant for our frontend

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions