Files
coms3011a-lab1/types/task.ts
2026-08-11 20:49:59 +02:00

24 lines
479 B
TypeScript

export type TaskStatus = "Todo" | "In-Progress" | "Complete";
export type TaskSort = "createdAt" | "topic" | "status" | "dueDate";
export type TaskInput = {
title: string;
description: string;
dueDate: string;
topic: string;
};
export type Task = TaskInput & {
id: number;
status: TaskStatus;
archivedAt: string | null;
createdAt: string;
updatedAt: string;
isOverdue: boolean;
};
export type TaskUpdate = Partial<TaskInput> & {
status?: TaskStatus;
};