valibot-ts-codegen

1.0.6 • Public • Published

Valibot TS codegen

Tool for autogenerate simple schema for valibot

Getting started

First you need to install

yarn add valibot-ts-codegen

After 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

/valibot-ts-codegen/

    Package Sidebar

    Install

    npm i valibot-ts-codegen

    Weekly Downloads

    2

    Version

    1.0.6

    License

    MIT

    Unpacked Size

    24 kB

    Total Files

    7

    Last publish

    Collaborators

    • stovv