@onetyped/typebox
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@onetyped/typebox

onetyped integration for TypeBox

Warning TypeBox is severely limited by its requirement to support JSON schema. This package will likewise not work as expected. It probably never will.

Usage

import { number, object, string } from '@onetyped/core'
import { toTypeBoxString } from '@onetyped/typebox'

const schema = object({
	name: string(),
	age: number(),
})

// print TypeBox representation of schema
console.log(toTypeBoxString(schema))

Output:

Type.Object({
	name: Type.String(),
	age: Type.Number(),
})

/@onetyped/typebox/

    Package Sidebar

    Install

    npm i @onetyped/typebox

    Weekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    11.9 kB

    Total Files

    9

    Last publish

    Collaborators

    • juliusmarminge
    • katt
    • sachinraja