Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Schemata Typescript Edition [wip] #5

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jmurth1234
Copy link

This is a PR to rewrite schemata using typescript, with all the benefits that gives us including type inference of:

  • Basic types
  • Schemata Types
  • Schemata Arrays
  • Extended types

All without having to define any additional interfaces

There are minimal API changes, the use of schemata in a project should be the same as it is now.

The main difference is how schemata instances and schemata arrays are handled. Previously, these were standard JS Objects. Now, in order to infer their type when used in a schema, they are now passed as functions.

Things still left to do:

  • Rewrite the rest of the codebase + tests in TypeScript
  • Write documentation
  • Make sure any helper types that might be needed outside schemata are exported

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