UNPKG

askeroo

Version:

A modern CLI prompt library with flow control, history navigation, and conditional prompts

38 lines 1.33 kB
/** * Example: Using the Store Factory Pattern * * This demonstrates the modern, ergonomic approach to managing external state * with createStore. */ interface Task { id: string; title: string; status: "idle" | "running" | "success" | "error"; } export declare const taskStore: import("../src/core.js").Store<{ tasks: Task[]; activeTaskId: string | null; }>; export declare function addTask(task: Task): void; export declare function setActiveTask(taskId: string | null): void; export declare function updateTaskStatus(taskId: string, status: Task["status"]): void; export declare function clearTasks(): void; export declare const TasksDisplay: (opts?: any) => Promise<any>; interface TaskList { id: string; name: string; taskIds: string[]; } export declare const taskListStore: import("../src/core.js").Store<{ lists: Map<string, TaskList>; activeListId: string | null; }>; export declare const taskDataStore: import("../src/core.js").Store<{ tasks: Map<string, Task>; }>; export declare function deleteTaskList(listId: string): void; export declare function getTaskById(taskId: string): Task | undefined; export declare function getAllActiveTasks(): Task[]; export declare function setupTaskLogger(): () => void; export {}; //# sourceMappingURL=store-factory-example.d.ts.map