Skip to content

feat: name the types inferred from one schema, add CreateInputOf - #3

Merged
dynotable-user merged 4 commits into
mainfrom
docs/types-from-schema
Nov 22, 2026
Merged

dynotable-user merged 4 commits into
mainfrom
docs/types-from-schema

Conversation

@dynotable-user

@dynotable-user dynotable-user commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

The README never said the core idea: you define the item schema once and every type is inferred from it. There was also no named type for what create takes, so the docs used Parameters<typeof M.create>[0].

  • New CreateInputOf<typeof M> (a Partial of the schema input), beside ItemOf, KeyInputOf and UpdateInputOf. Type tests pin it to the input type and to create's parameter.
  • README: a "Types from the schema" section with a compiled snippet; @ts-expect-error lines hold the claims. It states the limits: input vs output, timestamps, no Zod.
  • TSDoc on model(), ItemOf, ModelTypesOf and CreateInputOf.

A new exported type, so it ships in the next minor release. No tag here.

@dynotable-user dynotable-user changed the title docs: explain types inferred from one schema feat: name the types inferred from one schema, add CreateInputOf Nov 22, 2026
@dynotable-user
dynotable-user merged commit f380894 into main Nov 22, 2026
3 checks passed
@dynotable-user
dynotable-user deleted the docs/types-from-schema branch November 22, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant