export class Todo { something?: boolean; constructor(private readonly id: string, private content: string) {} // Update the todo's content. setContent(content: string) { this.content = content; } } /** * @post /api/todos */ export function createTodo(content: string): Todo { return new Todo(new Date().toISOString(), content); }