Theo Browneugh68d778b9 months agoHistory
19 lines · 496 B · TypeScript
RawDownload
import { z } from "zod"; export const todoSchema = z.object({  id: z.string().min(1),  title: z.string().min(1).max(280),  completed: z.boolean(),  createdAt: z.string().datetime(),}); export const todoListSchema = z.array(todoSchema); export const newTodoInputSchema = z.object({  title: z.string().trim().min(1).max(280),}); export const todoIdSchema = z.string().min(1); export type Todo = z.infer<typeof todoSchema>;export type NewTodoInput = z.infer<typeof newTodoInputSchema>;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t