valibot-ts-codegen
v1.0.6
Published
Generate valibot scheme from typescript type aliases
Readme
Valibot TS codegen
Tool for autogenerate simple schema for valibot
Getting started
First you need to install
yarn add valibot-ts-codegenAfter installing add command to package.json
{
// ...
"scripts": {
// ...
"gen-valibot-schemas": "vtc --path ./**/*.ts --result ./valibot-schemas.ts"
// ...
},
// ...
}Supported types
- string
- number
- bigint
- boolean
- null
- symbol
- undefined
- array
- object
- date
- map
- record
- set
- tuple
- union
- unknown
- void
- never
- any
Not supported
- multiline union
type NotSupportedUnion = { u: string | number | boolean; } - enum
- intersection
