File

libs/tasks/domain/src/lib/entities/task.entity.ts

Index

Properties
Methods

Constructor

Private constructor(id: string, title: string, description: string | null, categories: string[])
Parameters :
Name Type Optional
id string No
title string No
description string | null No
categories string[] No

Properties

Public Readonly categories
Type : string[]
Public Readonly description
Type : string | null
Public Readonly id
Type : string
Public Readonly title
Type : string

Methods

Static create
create(id: string, title: string, description: string | null, categories: string[])

Creates a new task

Parameters :
Name Type Optional
id string No
title string No
description string | null No
categories string[] No
Returns : Task
export class Task {
  private constructor(
    public readonly id: string,
    public readonly title: string,
    public readonly description: string | null,
    public readonly categories: string[],
  ) {}

  /**
   * Creates a new task
   */
  static create(
    id: string,
    title: string,
    description: string | null,
    categories: string[],
  ): Task {
    return new Task(id, title, description, categories);
  }
}

results matching ""

    No results matching ""