Skip to Content
gentlemans-stack
ReferenceModels

todo-model

Browser-safe runtime schemas and inferred types for the todo public representation.

API

  • todoSchema, todoIdSchema: the portable todo schema and its ID.
  • Type: Todo.
  • IDs are 24-character hexadecimal strings.
  • A todo belongs to a workspace (workspaceId, workspaceIdSchema from workspace-model) and records who created it (ownerId, the IAM user id). Both are required, so a todo stored before workspaces existed does not parse.
  • Creation dates are ISO 8601 datetime strings.
  • The package contains no persistence or transport dependencies.

Commands

pnpm nx run todo-model:typecheck   # type-check the package
pnpm nx run todo-model:test        # run the Vitest suite

On this page