Let's start with the domain model, as it will become the core of our application.
Implementing the new domain model
Creating the TodoItem class
Remove everything from the todo-it.ts file. Then, add the definition of the TodoItem class:
class TodoItem { private readonly _creationTimestamp: number;
private readonly _identifier: string; constructor(private _description: string, identifier?: string) { this._creationTimestamp = new Date().getTime(); if (identifier) { this._identifier = identifier; } else { // this is just for the example; for any real project, use // UUIDs instead: https://www.npmjs.com/package/uuid this._identifier...