示例工程 51-test-pyramid

51-test-pyramid/app/.tsc/shared/todo.d.ts

typescript · 0.6 KB

export type Todo = {
    id: number;
    title: string;
    done: boolean;
};
export type Filter = "all" | "active" | "done";
export declare function addTodo(todos: Todo[], title: string): Todo[];
export declare function toggleTodo(todos: Todo[], id: number): Todo[];
export declare function visibleTodos(todos: Todo[], filter: Filter): Todo[];
export declare function parseAddRequest(value: unknown): asserts value is {
    title: string;
};
export declare function parseToggleRequest(value: unknown): asserts value is {
    id: number;
};
//# sourceMappingURL=todo.d.ts.map