Introduction

In the previous article I described how I split larger TypeScript projects into several sub-projects, with a schemas package at the bottom that contains all shared types and runtime validators based on vts.

That setup works well, but it has one weakness: writing the schemas by hand. A typical vts schema looks like this:

export const UserSchema = Vts.object({

id: Vts.string({description: 'User identifier'}),