feat: add vitest, vite, move to tdd
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { Task } from "@/model/task";
|
||||
|
||||
export interface IFileSystem {
|
||||
readFile(path: string): Promise<string>;
|
||||
writeFile(path: string, content: string): Promise<void>;
|
||||
deleteFile(path: string): Promise<void>;
|
||||
readdir(path: string): Promise<string[]>;
|
||||
mkdir(path: string): Promise<void>;
|
||||
}
|
||||
|
||||
export interface ITaskRepository {
|
||||
list(folderPath: string): Promise<Task[]>;
|
||||
getById(folderPath: string, id: string): Promise<Task | undefined>;
|
||||
create(
|
||||
folderPath: string,
|
||||
task: Omit<Task, "id" | "created" | "updated">,
|
||||
): Promise<Task>;
|
||||
update(folderPath: string, task: Task): Promise<void>;
|
||||
delete(folderPath: string, id: string): Promise<void>;
|
||||
}
|
||||
|
||||
export interface IConfigProvider {
|
||||
getProjectTaskPath(): string | undefined;
|
||||
getGlobalTaskPath(): string | undefined;
|
||||
getFileExtension(): string;
|
||||
}
|
||||
Reference in New Issue
Block a user