Socket
Socket
Sign inDemoInstall

@sinclair/typebox

Package Overview
Dependencies
Maintainers
1
Versions
326
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.24.1 to 0.24.2

2

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

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

@@ -269,4 +269,7 @@ export declare const Kind: unique symbol;

}
export interface UnsafeOptions extends SchemaOptions {
[Kind]?: string;
}
export interface TUnsafe<T> extends TSchema {
[Kind]: 'Unknown';
[Kind]: string;
static: T;

@@ -351,3 +354,3 @@ }

/** Creates a user defined schema that infers as type T */
Unsafe<T>(options?: SchemaOptions): TUnsafe<T>;
Unsafe<T>(options?: UnsafeOptions): TUnsafe<T>;
/** Creates a void type */

@@ -354,0 +357,0 @@ Void(options?: SchemaOptions): TVoid;

@@ -296,3 +296,3 @@ "use strict";

Unsafe(options = {}) {
return this.Create({ ...options, [exports.Kind]: 'Unknown' });
return this.Create({ ...options, [exports.Kind]: options[exports.Kind] || 'Unsafe' });
}

@@ -299,0 +299,0 @@ /** Creates a void type */

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