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

1.0.1 • Public • Published

@onetyped/typebox

onetyped integration for the TypeScript AST/TypeChecker

Usage

import { number, object, string } from '@onetyped/core'
import { toTypeNode } from '@onetyped/typescript'

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

// print TypeScript AST type representation of schema
console.log(toTypeNode(schema))

Output:

{
	name: string
	age: number
}

Dependents (1)

Package Sidebar

Install

npm i @onetyped/typescript

Weekly Downloads

238

Version

1.0.1

License

MIT

Unpacked Size

40.9 kB

Total Files

11

Last publish

Collaborators

  • juliusmarminge
  • katt
  • sachinraja