Action | Type | Resolved On |
|---|---|---|
| Create types directory with proper TypeScript interfaces | feature | - - - |
Many functions return any[] instead of proper types. Create a src/types/ directory with TypeScript interfaces for all domain entities.
Functions use any[] return types:
export async function ideas(...): Promise<any[]>
export async function backlog(...): Promise<any[]>
export async function completedTasks(...): Promise<any[]>
Create src/types/index.ts:
export interface Idea {
name: string;
project: string;
completed: boolean;
link?: string;
description?: string;
color?: string;
side?: string;
}
export interface BacklogItem {
name: string;
progress: number;
link?: string;
level: number;
box?: string;
hover?: string;
line?: string;
}
export interface Task {
id?: string;
task: string;
parent: string;
completed_on?: string | null;
}
export interface Goal {
goal: string;
completed?: boolean;
due?: string;
owner?: string;
monthly?: boolean;
}
export interface Level {
project: string;
name: string;
story: string;
todo: string[];
completed: string[];
}
export interface Action {
action: string;
type: string;
project: string;
reported_on: string;
resolved: boolean;
slug: string;
}
src/lib/monthly.tssrc/lib/yearly.tssrc/lib/weekly.tssrc/types/index.ts