Shared API contract for the todo rig. Plain ESM npm package — no build step.
Consumed by api and web
as a git dependency:
{
"dependencies": {
"@fxck/contracts": "github:fxck/contracts"
}
}API_VERSION— string constant, the current contract version.Todo— the shape of a todo item ({ id, title, done, priority, dueDate }).validateTodo(value)— runtime type guard returningvalue is Todo.
npm run typecheck—tsc --noEmitover the JS (checkJs) and the hand-writtenindex.d.ts.npm test—node --test.