Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sinclair/typebox

Package Overview
Dependencies
Maintainers
1
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sinclair/typebox - npm Package Compare versions

Comparing version 0.17.7 to 0.17.8

2

package.json
{
"name": "@sinclair/typebox",
"version": "0.17.7",
"version": "0.17.8",
"description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",

@@ -5,0 +5,0 @@ "keywords": [

@@ -15,2 +15,4 @@ <div align='center'>

##### Node
```bash

@@ -20,2 +22,8 @@ $ npm install @sinclair/typebox --save

##### Deno
```typescript
import { Type, Static } from 'https://deno.land/x/typebox/src/typebox.ts'
```
## Usage

@@ -385,3 +393,3 @@

Type referencing can be useful to help reduce schema duplication when composing complex schemas. TypeBox allows for type referencing with the `Type.Box(...)` and `Type.Ref(...)` functions. The `Type.Box(...)` function creates a container for set of common related types and the `Type.Ref(...)` function allows referencing into the box. The following shows a set of common math types contained within a box, and a vertex structure that references those types.
Type referencing can be useful to reduce schema duplication when composing large schemas. TypeBox allows for type referencing with the `Type.Box(...)` and `Type.Ref(...)` functions. The `Type.Box(...)` function will creates a container for set of common related types and the `Type.Ref(...)` function allows referencing into the container. The following shows a set of common math types contained within a box, and a vertex structure that references those types.

@@ -437,3 +445,3 @@ ```typescript

TypeBox provides rudimentary support for recursive types. This is handled via the `Type.Rec(...)` method. The following creates a `Node` type that contains an array of inner `nodes`. Please note that due to current recursion limits on TypeScript inference, it's currently not possible for TypeBox to statically infer for recursive types. Instead TypeBox will resolve inner recursive types as `any`.
TypeBox provides support for recursive types. This is handled via the `Type.Rec(...)` function. The following creates a `Node` type that contains an array of inner `nodes`. Please note that due to current recursion limits on TypeScript inference, it's currently not possible for TypeBox to statically infer for recursive types. Instead TypeBox will resolve inner recursive types as `any`.

@@ -440,0 +448,0 @@ ```typescript

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc