Skip to content

Feature - Schemata Typescript Edition [wip]#5

Draft
jmurth1234 wants to merge 6 commits into
masterfrom
feature/typescript
Draft

Feature - Schemata Typescript Edition [wip]#5
jmurth1234 wants to merge 6 commits into
masterfrom
feature/typescript

Conversation

@jmurth1234
Copy link
Copy Markdown

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

jmurth1234 and others added 5 commits June 27, 2022 07:26
Convert remaining 6 JS source files and 12 JS test files to TypeScript,
standardize imports to ES6 style throughout, and add tsconfig.json for
type-checking. All 101 tests pass with zero tsc errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Feb 25, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​lodash.clonedeep@​4.5.71001006680100
Added@​babel/​preset-typescript@​7.17.121001007294100
Added@​babel/​register@​7.17.7991007695100
Added@​types/​mocha@​10.0.101001007780100
Added@​types/​node@​18.0.01001008196100
Addedtypescript@​4.7.410010010010080

View full report

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