File
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
|
|
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[])
|
|
Parameters :
Name |
Type |
Optional |
id |
string
|
No
|
title |
string
|
No
|
description |
string | null
|
No
|
categories |
string[]
|
No
|
|
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);
}
}