Skip to content

Repository files navigation

@fxck/contracts

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"
  }
}

Exports

  • 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 returning value is Todo.

Scripts

  • npm run typechecktsc --noEmit over the JS (checkJs) and the hand-written index.d.ts.
  • npm testnode --test.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages